使用HTTPS托管WCF服务 [英] Hosting WCF service with HTTPS

查看:114
本文介绍了使用HTTPS托管WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HTTPS托管WCF服务,并且遇到了将地址设置为正在运行的计算机的netbios名称的问题。如果我只想通过添加主机头来使用HTTP,这很容易解决,但不幸的是,您无法将主机头添加到HTTPS绑定。 (你可以在命令行上,但是我的IT部门对这样的黑客并不着迷)。

我几乎可以在任何地方搜索我能想到的东西。我想知道是否有其他人有这个问题,或者他们都只是通过HTTP公开他们的API?谢谢。



如果需要更多信息,我很乐意提供。

不幸的是,我不允许发布图片来显示此问题。元数据页面告诉我使用 https://mcweb1-prod.powertochange.local/TMC_API .svc?wsdl ,但我希望它使用一个外部地址。 不幸的是,它不允许您手动设置或读取证书中的URL。此链接说明了如何正确更改地址在元数据中。


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.

解决方案

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托管WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆