尽管我付出了很多努力,但我还是无法通过SSL在IIS上托管我的简单WCF服务。
我们正在使用带有IIS 6.0的Windows Server 2k3,我们在服务器上安装了.NET 4.0(网站配置为4.0)
如果我转到http //.../ rptService.svc url,我会看到带有代码块的.svc页面和?wsdl url
另一方面,如果我转到https //.../ rptService.svc我收到“资源未找到”404错误。 (网址上的冒号被删除b / c预防垃圾邮件)
该网站启用了有效的SSL证书。
我的相关web.config文件如下:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="rptBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="wcfApp.rptServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceMetadata httpsGetEnabled="false" httpGetEnabled="true" />
<serviceTimeouts/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="wcfApp.rptServiceBehavior"
name="wcfApp.rptService">
<endpoint binding="wsHttpBinding" bindingConfiguration="rptBinding" contract="wcfApp.rptService"
address="">
</endpoint>
<endpoint name="MetadataBinding" address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
我已经尝试了大约100种不同的方法来编写来自150个不同博客/网站帖子的web.config文件,但是到目前为止还没有任何工作。
我的最终目标是让这个wcf服务托管接受带有自定义用户名验证器的用户名/密码令牌,但是现在我甚至无法使用SSL!
应用程序正在VS 2010中构建。
如果我能提供更多信息,请告诉我。
任何帮助表示赞赏!