积极答复者
WCF部署服务器后产生超时

问题
答案
-
主要是使用 wsDualHttpBinding 双工通信的时候会有错误.不晓得为什么.难道双工通信一定要客户端调用才可以吗?
这是 安全加密协商失败导致的错误。
你服务端也要配置一下:
<bindings>
<wsDualHttpBinding>
<binding name="SecureMessage" >
<security mode="None" >
<message clientCredentialType="UserName" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>不适用安全模式 就可以了
Frank Xu Lei--谦卑若愚,好学若饥
[老徐的网站]:http://www.frankxulei.com/[老徐的博客]:http://54peixun.com/Author/frankxulei
微软WCF中文技术论坛
微软WCF英文技术论坛
Windows Azure中文技术论坛- 已标记为答案 LeoTangModerator 2012年7月23日 5:44
全部回复
-
贴上APP.CONFIG
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
<system.serviceModel>
<!-- 绑定安全模式-->
<bindings>
<wsDualHttpBinding>
<binding name="SecureMessage" >
<security mode="None" >
<message clientCredentialType="UserName" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<!-- 绑定证书-->
<!-- test--><behaviors>
<serviceBehaviors >
<behavior name="CalculatorServiceBehavior" >
<serviceMetadata httpGetEnabled="true" />
<serviceCredentials>
<!--指定一个 X.509 证书,用户对认证中的用户名密码加密解密-->
<serviceCertificate findValue="CN=MyServerCer" x509FindType="FindBySubjectDistinguishedName"storeLocation="LocalMachine" storeName="My"/>
<clientCertificate>
<!--自定义对客户端进行证书认证方式 这里为 None-->
<authentication certificateValidationMode="None"/>
<!--<authentication certificateValidationMode="Custom" customCertificateValidatorType="FBService.MyX509Validator,FBService" />
-->
</clientCertificate>
<!--自定义用户名和密码验证的设置-->
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="Serviceapp.MyUserNamePasswordValidator,Serviceapp" />
</serviceCredentials>
</behavior></serviceBehaviors>
</behaviors>
<!-- 基本配置-->
<services>
<service behaviorConfiguration="CalculatorServiceBehavior" name="FBService.TimeService">
<endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="SecureMessage"
contract="FBService.ITimeService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="http://192.168.1.144:1234/Test/TimeService/Service1/" />
</baseAddresses>
</host>
</service>
</services></system.serviceModel>
</configuration> -
主要是使用 wsDualHttpBinding 双工通信的时候会有错误.不晓得为什么.难道双工通信一定要客户端调用才可以吗?
这是 安全加密协商失败导致的错误。
你服务端也要配置一下:
<bindings>
<wsDualHttpBinding>
<binding name="SecureMessage" >
<security mode="None" >
<message clientCredentialType="UserName" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>不适用安全模式 就可以了
Frank Xu Lei--谦卑若愚,好学若饥
[老徐的网站]:http://www.frankxulei.com/[老徐的博客]:http://54peixun.com/Author/frankxulei
微软WCF中文技术论坛
微软WCF英文技术论坛
Windows Azure中文技术论坛- 已标记为答案 LeoTangModerator 2012年7月23日 5:44