【发布时间】:2014-03-07 14:50:43
【问题描述】:
我一直致力于开发在 VS 2008 中开发并托管在 Windows Server 2008、IIS 7.0 中的 WCF 服务, 当我在本地环境中托管此服务时,它可以正常工作,但是当我在生产站点中托管此服务时,它无法正常工作。 在此服务中,我使用 WShttpbinding 绑定,并且我使用的安全模式是消息,客户端凭据类型是“用户名”
<security mode= "Message">
<message clientCredentialType="UserName" />
</security>
在行为配置中我使用的是
<behavior name="name">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpsGetUrl="https://serviceurl/basic"/>
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<serviceCertificate findValue="CN=WMSvc-AMAZONA-PJ1K606" />
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider" embershipProviderName="WCFSqlProvider" />
</serviceCredentials>
</behavior>
但是当我从我的客户端应用程序使用服务时,它给了我错误
在“//服务托管的机器名/servicename/$metadata”处没有主动监听的通道这通常是由不正确的地址 URI 引起的。确保 消息发送到的地址与服务正在侦听的地址匹配。
【问题讨论】:
标签: wcf wcf-security wcf-wshttpbinding