首页 新闻 赞助 找找看

wcf服务 winform 无法满足对安全令牌的请求,因为身份验证失败

0
悬赏园豆:30 [已解决问题] 解决于 2012-02-24 17:19

wcf服务 winform 无法满足对安全令牌的请求,因为身份验证失败


客户端
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ISystemService" closeTimeout="00:01:00"
openTimeout
="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal
="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize
="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding
="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead
="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled
="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm
="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite
="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://192.168.10.120:8732/Host/SystemService/"
binding
="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISystemService"
contract
="SystemClient.ISystemService" name="WSHttpBinding_ISystemService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>

 




服务器端

<?xml version="1.0" encoding="utf-8" ?>
<configuration> 
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Host.SystemServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>

<services>
<service behaviorConfiguration="Host.SystemServiceBehavior" name="Host.SystemService">
<endpoint address="" binding="wsHttpBinding" contract="Host.ISystemService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://192.168.10.120:8732/Host/SystemService/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>

 

colvinliu的主页 colvinliu | 初学一级 | 园豆:6
提问于:2011-01-20 11:56
< >
分享
最佳答案
0

看配置,你用的是 Windows 身份验证,客户端调用时要使用服务器上的用户及密码,不知是不是这个原因?

收获园豆:30
鹤冲天 | 老鸟四级 |园豆:2379 | 2011-01-21 20:08
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册