Hosting WCF service with HTTPS

╄→尐↘猪︶ㄣ 提交于 2019-12-08 07:58:06

问题


I am hosting a WCF service using HTTPS, and I am running into a problem with the address being set to the netbios name of the machine I am running it on. This is easily remedied if I just want to use HTTP by adding a host header, but unfortunately, you cannot add host headers to HTTPS bindings. (you can on the command line, but my IT department isn't crazy about hacks like that).

I've searched pretty much everywhere I can think of. I'm wondering if anyone else has this problem, or if they all just expose their APIs over HTTP? Thanks.

If more information is necessary, I'd be happy to provide it.

Unfortunately, I'm not allowed to post images to show the issue. The metadata page is telling me to use https://mcweb1-prod.powertochange.local/TMC_API.svc?wsdl, but I'd like it to use an external address instead.


回答1:


When you add the HTTPS binding in IIS unfortunately it does not let you manually set or read the URL from the cert. This link explains how to properly change the address in the metadata.



来源:https://stackoverflow.com/questions/4128900/hosting-wcf-service-with-https

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!