这是iam获取的错误:WCF安全执行错误
无法处理消息。这很可能是因为动作'http://tempuri.org/xxxxxx'不正确,或者因为消息包含无效或过期的安全上下文令牌或者因为绑定之间存在不匹配。如果服务由于不活动而中止通道,则安全上下文令牌将无效。为了防止服务中止空闲会话过早加大对服务端点的绑定
这里是我的web.config副本接收超时:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsUserNameToken">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None"/>
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="ServiceName" behaviorConfiguration="userNameTokenBehavior">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsUserNameToken" name="userNameTokenService" contract="ContractName"/>
<endpoint address="mex" binding="wsHttpBinding" bindingConfiguration="wsUserNameToken" name="MexHttpsBindingEndpoint" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="userNameTokenBehavior">
<serviceMetadata httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceCredentials>
<serviceCertificate findValue="xxxxxxxxxxxxx" x509FindType="FindByThumbprint" storeLocation="LocalMachine" storeName="My" />
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="xxxxx.xxxxx.UsernameValidator, App_Code"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
谁能请弄清楚什么是错我的配置文件?
WCF是客户端和服务器之间的舞蹈。你是否也可以包含你的客户端配置。 – 2012-01-11 15:54:21
您的服务名称属性和端点合同属性应该是完全限定名称。同时启用跟踪您的服务,以了解为什么事情失败的原因 – Rajesh 2012-07-30 15:40:59