• WCF X.b 操作引用了已经从 Y.b 操作导出的消息元素 [http://tempuri.org/:b]。可以通过更改方法名称或使用 OperationContractAttribute 的 Name 属性更改其中一个操作的名称...


    详细错误如下:
    很可能由 IncludeExceptionDetailInFaults=true 创建的 ExceptionDetail,其值为:
    System.InvalidOperationException: 在调用 WSDL 导出扩展过程中引发异常: System.ServiceModel.Description.DataContractSerializerOperationBehavior
    协定: http://tempuri.org/:ICommunicationContract ----> System.InvalidOperationException: nt.WcfContract.IServerCallback.LoginOut 操作引用了已经从 nt.WcfContract.ICommunicationContract.LoginOut 操作导出的消息元素 [http://tempuri.org/:LoginOut]。可以通过更改方法名称或使用 OperationContractAttribute 的 Name 属性更改其中一个操作的名称。或者可以使用 MessageContract 编程模型更详细地控制元素名称。
       在 System.ServiceModel.Description.MessageContractExporter.AddElementToSchema(XmlSchemaElement element, String elementNs, XmlSchemaSet schemaSet)
       在 System.ServiceModel.Description.MessageContractExporter.ExportWrappedPart(Message message, String elementName, String elementNs, XmlSchemaSet schemaSet, Boolean skipSchemaExport)
       在 System.ServiceModel.Description.DataContractSerializerMessageContractExporter.ExportBody(Int32 messageIndex, Object state)
       在 System.ServiceModel.Description.MessageContractExporter.ExportMessage(Int32 messageIndex, Object state)
       在 System.ServiceModel.Description.MessageContractExporter.ExportMessageContract()
       在 System.ServiceModel.Description.WsdlExporter.CallExtension(WsdlContractConversionContext contractContext, IWsdlExportExtension extension)
       --- 内部 ExceptionDetail 堆栈跟踪结束 ---
       在 System.ServiceModel.Description.WsdlExporter.CallExtension(WsdlContractConversionContext contractContext, IWsdlExportExtension extension)
       在 System.ServiceModel.Description.WsdlExporter.CallExportContract(WsdlContractConversionContext contractContext)
       在 System.ServiceModel.Description.WsdlExporter.ExportContract(ContractDescription contract)
       在 System.ServiceModel.Description.WsdlExporter.ExportEndpoint(ServiceEndpoint endpoint, XmlQualifiedName wsdlServiceQName)
       在 System.ServiceModel.Description.WsdlExporter.ExportEndpoints(IEnumerable`1 endpoints, XmlQualifiedName wsdlServiceQName)
       在 System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata()
       在 System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized()
       在 System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension)
       在 System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData()
       在 System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleDocumentationRequest(Message httpGetRequest, String[] queries, Message& replyMessage)
       在 System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest)
       在 SyncInvokeGet(Object , Object[] , Object[] )
       在 System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       在 System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
       在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
       在 System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
       在 System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
    

    出现这个错误的原因是  契约中的CallbackContract回调接口中有方法名和契约中的方法名相同。

  • 相关阅读:
    ADB命令大全
    Backup your Android without root or custom recovery -- adb backup
    Content portal for Pocketables Tasker articles
    Is there a way to detect if call is in progress? Phone Event
    Tasker to proximity screen off
    Tasker to detect application running in background
    Tasker to create toggle widget for ES ftp service -- Send Intent
    Tasker to proximity screen on
    Tasker to answer incoming call by pressing power button
    Tasker to stop Poweramp control for the headset while there is an incoming SMS
  • 原文地址:https://www.cnblogs.com/lxiang/p/3158916.html
Copyright © 2020-2023  润新知