在哪里为IISExpress指定我的SSL端口

在哪里为IISExpress指定我的SSL端口

本文介绍了在哪里为IISExpress指定我的SSL端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好,所以我曾经能够在项目属性对话框中更改SSL端口号,但是更新asp.net 5 RC1之后,SSL字段为只读:

OK, so I used to be able to change the SSL port number in the project properties dialog, but after the asp.net 5 RC1 update, the SSL field is read-only:

当我尝试直接编辑.xproj时,它将忽略SSLPort值:

It ignores the SSLPort value when I attempt to edit the .xproj directly:

<PropertyGroup>
    <SchemaVersion>2.0</SchemaVersion>
    <DevelopmentServerPort>17204</DevelopmentServerPort>
    <SSLPort>44303</SSLPort>
  </PropertyGroup>

当更改绑定并启动项目时,它还会将我的应用程序主机配置文件($ [solutionDir] .vs \ config \ applicationhost.config)中的端口重置为原始值.

And it also resets the port in my app host config file ($[solutionDir].vs\config\applicationhost.config) back to the original value when I change the binding and launch my project.

        <site name="WebApplication1" id="8">
            <application path="/" applicationPool="Clr4IntegratedAppPool">
                <virtualDirectory path="/" physicalPath="C:\WebApplication1\wwwroot" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:17833:localhost" />
                <binding protocol="https" bindingInformation="*:44303:localhost" />
            </bindings>
        </site>

有什么作用? Visual Studio从何处获得此值,以及如何更改它?

What gives? Where is Visual Studio getting this value from, and how do I change it?

推荐答案

./Properties文件夹下打开launchSettings.json.读取iisSettings> iisExpress> sslPort中的 int 值.您可以将该值更改为所需的任何值.

Open launchSettings.json under the ./Properties folder. The int value in iisSettings > iisExpress > sslPort is where it's read from. You can change that value to whatever you want.

{
  "iisSettings": {
    "iisExpress": {
      "sslPort": <ssl-port-value>
    }
  }
}

这篇关于在哪里为IISExpress指定我的SSL端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 04:18