wcf 服务
本机调试 可以通过
局域网内 客户端可以连接到 服务器 但是调用服务器方法就出错 “无法满足对安全令牌的请求,因为身份验证失败”
有高手帮忙看下嘛
服务器的 APP。CONFIG 文件 内容
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Server.Update_MethodBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Server.Update_MethodBehavior"
name="Server.Update_Method">
<endpoint address="" binding="wsHttpBinding" contract="Server.IUpdate_Method">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://192.168.1.113:8731/Design_Time_Addresses/Server/Update_Method/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
客户端的
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IUpdate_Method" 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="655360000"
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.1.113:8731/Design_Time_Addresses/Server/Update_Method/"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate_Method"
contract="AutoUpdateServer.IUpdate_Method" name="WSHttpBinding_IUpdate_Method">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
<message clientCredentialType="Windows"
你需要在客户端代理类中填写 Windows 系统或者域的用户名和密码.
注意,如果是系统用户,一定要是服务器上的用户,如果是域用户,服务器必须在域中,
填写用户名时,一定使用完全限定名,即:域名\用户名
怎么解决的啊 说下啊。 谢谢