[英]WCF binding problems
I have problem with my bindings and i dont know how to solve it. 我的绑定有问题,我不知道如何解决。 I am on the server side and the client is using this binding: 我在服务器端,客户端正在使用此绑定:
<system.web>
<compilation debug="true" targetFramework="4.5.2"/>
<httpRuntime targetFramework="4.5.2"/>
<httpModules>
<add name="ApplicationInsightsWebTracking"
type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule,
Microsoft.AI.Web"/>
</httpModules>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true"/>
<bindings>
<customBinding>
<binding name="pciBinding" receiveTimeout="00:05:00"
sendTimeout="00:05:00">
<textMessageEncoding messageVersion="Soap11WSAddressing10"
writeEncoding="utf-8" />
<httpTransport maxReceivedMessageSize="67108864" />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<remove name="ApplicationInsightsWebTracking"/>
<add name="ApplicationInsightsWebTracking"
type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule,
Microsoft.AI.Web"
preCondition="managedHandler"/>
</modules>
<directoryBrowse enabled="true"/>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
I put this also in my config file but the exception is still the same: The header 'Action' from the namespace ' http://www.w3.org/2005/08/addressing ' was not understood by the recipient of this message, causing the message to not be processed. 我也将其放在配置文件中,但例外情况仍然相同: 此消息的接收者无法理解命名空间“ http://www.w3.org/2005/08/addressing ”中的标头“ Action” ,导致无法处理该消息。 This error typically indicates that the sender of this message has enabled a communication protocol that the receiver cannot process. 此错误通常表示此消息的发送者已启用接收者无法处理的通信协议。 Please ensure that the configuration of the client's binding is consistent with the service's binding. 请确保客户端绑定的配置与服务的绑定一致。
What i need to do in order this to works? 我需要做些什么才能使其正常工作?
You need to add a Endpoint to your config: 您需要在配置中添加一个端点:
<system.serviceModel>
<services>
<service>
<endpoint binding="customBinding" bindingConfiguration="pciBinding" name="MyEndpoint" behaviorConfiguration="myBehavior" contract="Your.Contract.Interface.With.Fullname" />
</service>
</services>
</system.serviceModel>
and you need to give your behaviour a name to bind it on the endpoint, in this example it's called "myBehavior". 并且需要给您的行为起一个名称以将其绑定到端点上,在此示例中,其名称为“ myBehavior”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.