Asp.net
我在哪里為 IISExpress 指定我的 SSL 埠?
好的,所以我以前可以在項目屬性對話框中更改 SSL 埠號,但是在 asp.net 5 RC1 更新之後,SSL 欄位是只讀的:
當我嘗試直接編輯 .xproj 時,它會忽略 SSLPort 值:
<PropertyGroup> <SchemaVersion>2.0</SchemaVersion> <DevelopmentServerPort>17204</DevelopmentServerPort> <SSLPort>44303</SSLPort> </PropertyGroup>它還會重置我的應用程序主機配置文件中的埠($
$$ solutionDir $$當我更改綁定並啟動我的項目時,.vs\config\applicationhost.config) 恢復為原始值。
<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 從哪裡獲得這個值,我該如何改變它?
在文件夾
launchSettings.json下打開。./PropertiesiisSettings > iisExpress > sslPort 中的int值是讀取它的位置。您可以將該值更改為您想要的任何值。{ "iisSettings": { "iisExpress": { "sslPort": <ssl-port-value> } } }
