http改成https wcf 配置更改

最近有个内部系统要对外公开,要开启https ,所有模块都正常运行,但偏偏服务层出问题了。

The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address.  Either supply an http base address or set HttpGetUrl to an absolute address.


从上面的字面告诉我们,元数据被设置true ,但这个是针对http,无法支持https,所以地址无法使用,必须使用相对的http服务。

原来如此,问题是我们开启元数据出错了。

解决:

<serviceMetadata httpGetEnabled="true" />

 改为:

<serviceMetadata httpsGetEnabled="true" />

http改为https 即可,记录下送给同样需要的同学

原文地址:https://www.cnblogs.com/flyfish2012/p/3057042.html