在IIS Express中使用SSL

时间:2018-05-02 10:42:20

标签: iis-express

我正在尝试使用假域(bobby.fisher.com)在localhost上运行我的VS项目。为此,我在applicationhost.config文件中创建了一个虚拟目录,如下所示:

 <site name="Tidywork.Integrations.Web" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
      <virtualDirectory path="/" physicalPath="C:\bobbyfisher\Workspaces\bobbyfisher.Integrations\bobbyfisher.Integrations\bobbyfisher.Integrations.Web" />
    </application>
    <bindings>
      <binding protocol="http" bindingInformation="*:35464:localhost" />
      <binding protocol="http" bindingInformation="*:80:bobby.fisher.com" />
      <binding protocol="https" bindingInformation="*:44321:localhost" />
      <binding protocol="https" bindingInformation="*:44321:bobby.fisher.com" />
    </bindings>
  </site>

然而,当我尝试运行程序(https://bobby.fisher.com/)时,我最终得到了一个错误:

This site can’t be reached
bobby.fisher.com refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

有人有任何建议如何做到这一点?

1 个答案:

答案 0 :(得分:0)

如果您在访问网站时未在URL中指定端口,那么如果您选择https://(根据您的示例),浏览器将尝试自动连接端口443 - 因为&# 39;是HTTPS的标准端口。

但是您还没有在IIS设置中配置该端口。因此,要么将该端口绑定到应用程序的https,要么在URL中明确使用端口号(例如https://bobby.fisher.com:44321

相关问题