Closed jrmcdona closed 7 years ago
This isn't really a C# extension question but rather an ASP.NET question. So you may have better luck asking the question on an ASP.NET repo.
your project should have a launchSettings.json
file similar to this one:
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:12345/",
"sslPort": 0
}
},
There will be entries for iis, Project, etc. The applicationUrl will configure the port that is used by the app.
This page has some details regarding the launchSettings file. If you don't find the answer you're looking for, I'd open an issue on https://github.com/aspnet/home.
launchSettings.json
is not read when launching with vscode (using launch.json). Environment variable ASPNETCORE_URLS should be used instead:
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "http://localhost:4000/"
}
Environment data
.NET Command Line Tools (2.0.0)
Product Information: Version: 2.0.0 Commit SHA-1 hash: cdcd1928c9
Runtime Environment: OS Name: Windows OS Version: 10.0.15063 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version: 1.16.0
C# Extension version: 1.12.1
I am just trying to figure out how to change the port when I launch the debugger. Right now it launches with 5000 by default.