当您最初设置IIS Express以启用SSL时,它默认端口为44300.不幸的是,当我尝试访问我的站点时,它不起作用,除非我使用端口号44300 - https://localhost:44300/
。启用SSL时,IIS Express默认端口44300用于https
的链路使用生成以下:
<%= Html.ActionLink("Index", "Index", "Home", new { @action = "https://" + Request.Hostname + Url.Action("Index", "Home") }) %>
虽然难看的解决方案,@action
关键字可以覆盖所生成的路线,但它意味着,应用程序将看似需要知道任何非标准的端口(例如44300)。
问题在于我会写一些东西来解决只会在开发环境中出现的问题。
所以我的问题是...我如何将端口更改为443,并有IIS Express?
配置为我的网站低于:
<site name="MySite" id="2" serverAutoStart="true">
<application path="/">
<virtualDirectory path="/" physicalPath="C:\Inetpub\MySite" />
</application>
<bindings>
<binding protocol="http" bindingInformation=":80:" />
<binding protocol="https" bindingInformation=":44300:" />
</bindings>
</site>
提前非常感谢。
更新:
这个问题已经通过迪夫亚已经answered在对IIS论坛。
我的Win7机,'的netsh HTTP显示上sslcert'返回了超过100个条目,44300位于顶部。所以使用命令'netsh http show sslcert |更多'或'netsh http显示sslcert> output.txt'使自己更容易。 – rymo 2013-03-28 21:03:21
@rymo作为一种方法,你可以使用'netsh http show sslcert ipport = 0.0.0.0:44300'来过滤掉那个特定的一个。 – Alpha 2013-09-25 19:33:33
或其他解决方案:'netsh http show sslcert | clip'将结果复制到剪贴板,然后将其粘贴到文本编辑器中并在那里搜索 – 2015-03-17 16:25:22