IIS防爆preSS默认端口44300 HTTPS的启用SSL时 [英] IIS Express defaulting to port 44300 for https when enabling SSL

查看:314
本文介绍了IIS防爆preSS默认端口44300 HTTPS的启用SSL时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您最初设置IIS防爆preSS启用SSL,则默认端口为44300.不幸的是,当我尝试访问我的网站在 https://开头本地主机/ 这是行不通的,除非我使用的端口号44300 - 的https://本地主机:44300 /

When you initially set up IIS Express to enable SSL, it defaults the port to 44300. Unfortunately, when I try to access my site in on https://localhost/ it doesn't work unless I use the port number 44300 - https://localhost:44300/.

使用以下生成的链接:

<%= Html.ActionLink("Index", "Index", "Home", new { @action = "https://" + Request.Hostname + Url.Action("Index", "Home") }) %>

虽然一个丑陋的解决方案, @Action 关键字可以覆盖生成的路线,但它意味着应用程序将看似需要了解的任何非标准端口(例如:44300)。

Although an ugly solution, the @action keyword can override the generated route, but it means that the application would seemingly need to be aware of any non-standard ports (eg 44300).

这样做的问题是,我会写的东西来解决,只会发生在开发环境中的一个问题。

The problem with that is that I'd be writing something to solve a problem that would only occur in a development environment.

所以我的问题是...我如何将端口更改为443,并有IIS防爆preSS样了?

So my question is... How do I change the port to 443 and have IIS Express like it?

配置为我的网站是如下:

Config for my site is below:

<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>

提前非常感谢。

更新:

这个问题一直回答通过了迪夫亚上的IIS的论坛。

This question has been answered by Divya over on the IIS forums.

推荐答案

这个问题已经回答通过迪夫亚在上的IIS的论坛。

This question has been answered by Divya over on the IIS forums.

一旦启用SSL在WebMatrix的一个网站,它默认端口44300,并不会在后台所有绑定。我希望你试图在配置文件中该端口更改为443。一旦完成并保存,还需要修改HTTP.SYS的结合。您将需要删除的端口44300现有条目并添加端口443项。
  要做到这一点,您可以使用httpcfg(操作系统/ Win2003的)或netsh的HTTP'(WinVista / Win2K8 / Win7的)。
  下面是命令的netsh的:

Once you enable SSL for a website in WebMatrix, it defaults to port 44300 and does all the bindings in the background. I am hoping that you tried to change this port to 443 in the config file. Once that is done and saved, you also need to modify the binding in http.sys. You would need to delete the existing entry for port 44300 and add the entry for port 443. To do this, you could use httpcfg (WinXp/Win2003) or 'netsh http' (WinVista/Win2K8/Win7). Here are the commands for netsh:

1)获取的appid和CERTHASH为44300我现有条目(
  假设,你要使用相同的证书,WebMatrix中
  默认情况下安装。如果要更改证书为好,
  从证书取得的证书的证书哈希
  店): netsh的HTTP显示的sslcert 。在输出搜索条目
  端口44300和复制CERTHASH和APPID。

1) Get the appid and certhash for the existing entry of 44300 (I assume, you are going to use the same certificate which WebMatrix installs by default. If you want to change the certificate as well, get the certificate hash of the certificate from the certificate store): netsh http show sslcert. In the output search for entry for port 44300 and copy certhash and appID.

2)删除了44300项: netsh的HTTP删除的sslcert ipport = 0.0.0.0:44300

2) Delete the entry for 44300: netsh http delete sslcert ipport=0.0.0.0:44300

3)添加端口443与CERTHASH和APPID一个新条目步骤复制
  1. 的netsh的http添加的sslcert ipport = 0.0.0.0:443 CERTHASH =&LT;&CERTHASH GT;的appid =&LT;&APPID GT;

3) Add a new entry for port 443 with certhash and appID copied in step 1. netsh http add sslcert ipport=0.0.0.0:443 certhash=<certhash> appid=<appid>

配置在HTTP.SYS进场后,需要重新启动HTTP
  为改变服务才能生效。

After configuring the entry in http.sys, you need to restart http service for the changes to take effect.

净停止HTTP

网​​络启动HTTP

正如其他人所指出的,有让你的SSL证书的几个不错的方式。

As noted by others, there are several nice ways of getting your SSL certs.

netsh http show sslcert > output.txt

或(我的preferred法):

or (my preferred method):

netsh http show sslcert | clip

这篇关于IIS防爆preSS默认端口44300 HTTPS的启用SSL时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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