這是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