我正在尝试将带有WCF服务的Silverlight部署到托管服务器.基本上,我和这个人有同样的问题: 如何在没有HTTP绑定的情况下配置WCF服务以通过HTTPS工作? 除了解决方案不适合我.
//编辑:我一直错误地粘贴它,但它仍然无效.
我试过Ladislav Mrnka的答案 - 在Web.config文件中更改了这个:
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
Run Code Online (Sandbox Code Playgroud)
当我导航到服务器上的.svc文件时,仍会出现可怕的错误:
The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the
HttpsGetUrl property is a relative address, but there is no https base address.
Either supply an https base address or set HttpsGetUrl to an absolute address.
Run Code Online (Sandbox Code Playgroud)