IIS Express Ports - Multiple Ports in File - iis-express

Dumb question, but I cannot find it. Why does IIS express use 2 ports (Sample file below).
Secondly, in this exercise here, when I'm requested to setup an app, it references 3007, which I cannot access.
https://learn.microsoft.com/en-us/learn/modules/identity-application-types/5-exercise-web-apps-call-apis
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:3007",
"sslPort": 3007
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IdentityWeb": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

iisSettings is used when running VS2019 or other visual studio version IDE.
IdentityWeb(peojectname) is for dotnet command line use.
Offical doc: Development and launchSettings.json
These are just different configurations of the project according to the operating environment, no need to entangle.
Test steps.
Delete iisSettings in vs2019, then change properties, then check launchSettings.json file.
Before deleted the ssl port is 44316, then we delete it. After changed properties, it generated new ssl port.
Now, we can run project(we need to restart IDE [vs2019]), it works fine.
Modify applicationUrl in IdentityWeb.
Open cmd or powershell in project folder.

Related

Blazor Debugging not hitting breakpoints

I am taking over maintenance of an ASP.Net Hosted WebAssembly project. Cannot debug it. I have added "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" to the launchsettings, I have done the Shift+Alt+D and then command window to restart Edge in debug mode. Nothing works, I do not see source code in the debug window, I cannot hit breakpoints server-side.
My feelings at this time are in a language ALL programmers know (unprintable as it is).
I could use some guidance from cooler and more experienced heads. I tried an alternate approach (code server side and switch to client-side) using this as a model https://github.com/ShaunCurtis/AllinOne but I still cannot debug.
I realize this may be iterative.
EDIT:
I've embedded both launchsetting files, the API is the startup project and I am using IIS Express to start the process.
Edge Version: Version 92.0.902.62 (64 bit)
VS2019 Professional Version: 16.10.4
WASM:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:41506/wasm",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/wasm/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"Blazor": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/wasm/_framework/debug/ws-proxy?browser={browserInspectUri}"
}
}
}
API:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:1686",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Blazor.API": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true"
}
}
}
EDIT 2 - Verbose Debug log
{"timestamp":1628178096458,"tag":"runtime.welcome","level":1,"message":"js-debug v1.54.2 started","metadata":{"os":"win32 x64","nodeVersion":"v12.20.1","adapterVersion":"1.54.2"}}
{"tag":"dap.receive","timestamp":1628178096359,"metadata":{"connectionId":0,"message":{"type":"request","command":"initialize","arguments":{"pathFormat":"path","clientID":"visualstudio","clientName":"Visual Studio","adapterID":"pwa-msedge","locale":"en-US","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"SupportsMessageBox":true,"supportsHandshakeRequest":true,"supportsVsAdditionalBreakpointBinds":true,"supportsHitCountsChange":true,"supportsVsCustomMessages":true,"supportsVariableEnumerators":true,"supportsMapURLToFilePathRequest":true,"supportsLaunchUnelevatedProcessRequest":true,"supportsAccessingSourcesThorughClient":true},"seq":1}},"level":0}
{"tag":"dap.send","timestamp":1628178096360,"metadata":{"connectionId":0,"message":{"seq":1,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":false,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"exceptionBreakpointFilters":[{"filter":"all","label":"Caught Exceptions","default":false,"supportsCondition":true,"description":"Breaks on all throw errors, even if they're caught later.","conditionDescription":"error.name == \"MyError\""},{"filter":"uncaught","label":"Uncaught Exceptions","default":false,"supportsCondition":true,"description":"Breaks only on errors or promise rejections that are not handled.","conditionDescription":"error.name == \"MyError\""}],"supportsStepBack":false,"supportsSetVariable":true,"supportsRestartFrame":true,"supportsGotoTargetsRequest":false,"supportsStepInTargetsRequest":false,"supportsCompletionsRequest":true,"supportsModulesRequest":false,"additionalModuleColumns":[],"supportedChecksumAlgorithms":[],"supportsRestartRequest":true,"supportsExceptionOptions":false,"supportsValueFormattingOptions":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":false,"supportsDelayedStackTraceLoading":true,"supportsLoadedSourcesRequest":true,"supportsLogPoints":true,"supportsTerminateThreadsRequest":false,"supportsSetExpression":false,"supportsTerminateRequest":false,"completionTriggerCharacters":[".","[","\"","'"],"supportsBreakpointLocationsRequest":true,"supportsClipboardContext":true,"supportsExceptionFilterOptions":true}}},"level":0}
{"tag":"dap.send","timestamp":1628178096362,"metadata":{"connectionId":0,"message":{"seq":2,"type":"event","event":"initialized","body":{}}},"level":0}
{"tag":"dap.receive","timestamp":1628178096445,"metadata":{"connectionId":0,"message":{"type":"request","command":"launch","arguments":{"WebRoot":"C:\\Users\\kah6235_aero\\source\\repos\\Blazor\\Blazor.API\\wwwroot","rootPath":"C:\\Users\\kah6235_aero\\source\\repos\\Blazor\\Blazor.API\\wwwroot","__workspaceFolder":"C:\\Users\\kah6235_aero\\source\\repos\\Blazor\\Blazor.API\\wwwroot","runtimeExecutable":"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe","runtimeArgs":[],"sourceMaps":true,"url":"http://localhost:1686/","trace":{"logFile":"C:\\Users\\kah6235_aero\\AppData\\Local\\Temp\\visualstudio-js-debugger.txt"},"port":54163,"launchUnelevated":false,"projectGuid":"4b5339f8-89f7-4c12-8c79-16d15d96f21d","userDataDir":"C:\\Users\\kah6235_aero\\AppData\\Local\\Microsoft\\VisualStudio\\16.0_5ac7f469\\WebTools\\F17440DA_75625535","breakOnLoad":true,"smartStep":true,"skipFiles":[],"showAsyncStacks":true,"timeout":60000,"inspectUri":"{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}","cleanUp":"onlyTab","name":"Visual Studio launch configuration override","type":"pwa-msedge","request":"launch","continueOnDisconnect":true},"seq":2}},"level":0}
{"tag":"dap.send","timestamp":1628178096448,"metadata":{"connectionId":0,"message":{"seq":3,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/launch","data":{"type":"pwa-msedge","request":"launch","os":"win32 x64","nodeVersion":"v12.20.1","adapterVersion":"1.54.2","parameters":"{\"type\":\"pwa-msedge\",\"name\":\"<string>\",\"request\":\"launch\",\"trace\":{\"logFile\":\"<string>\"},\"outputCapture\":\"console\",\"timeout\":60000,\"timeouts\":{},\"showAsyncStacks\":true,\"skipFiles\":[],\"smartStep\":true,\"sourceMaps\":true,\"pauseForSourceMap\":true,\"resolveSourceMapLocations\":null,\"rootPath\":\"<string>\",\"outFiles\":[\"<string>\",\"<string>\"],\"sourceMapPathOverrides\":{\"webpack:///./~/*\":\"<string>\",\"webpack:////*\":\"<string>\",\"webpack://?:*/*\":\"<string>\",\"webpack:///([a-z]):/(.+)\":\"<string>\",\"meteor://💻app/*\":\"<string>\"},\"enableContentValidation\":true,\"cascadeTerminateToConfigurations\":[],\"__workspaceFolder\":\"<string>\",\"__autoExpandGetters\":false,\"__breakOnConditionalError\":false,\"address\":\"localhost\",\"port\":54163,\"disableNetworkCache\":true,\"pathMapping\":{},\"url\":\"<string>\",\"restart\":false,\"urlFilter\":\"*\",\"webRoot\":\"<string>\",\"server\":null,\"browserAttachLocation\":\"workspace\",\"targetSelection\":\"automatic\",\"vueComponentPaths\":[\"<string>\",\"<string>\"],\"perScriptSourcemaps\":\"auto\",\"cwd\":null,\"file\":null,\"env\":{},\"includeDefaultArgs\":true,\"runtimeArgs\":[],\"runtimeExecutable\":\"<string>\",\"userDataDir\":\"<string>\",\"browserLaunchLocation\":\"workspace\",\"profileStartup\":false,\"cleanUp\":\"<string>\",\"useWebView\":false,\"WebRoot\":\"<string>\",\"launchUnelevated\":false,\"projectGuid\":\"<string>\",\"breakOnLoad\":true,\"inspectUri\":\"<string>\",\"continueOnDisconnect\":true}"}}}},"level":0}
{"tag":"dap.send","timestamp":1628178096450,"metadata":{"connectionId":0,"message":{"seq":4,"type":"event","event":"output","body":{"category":"console","output":"Verbose logs are written to:\nC:\\Users\\kah6235_aero\\AppData\\Local\\Temp\\visualstudio-js-debugger.txt\n"}}},"level":0}
{"tag":"dap.receive","timestamp":1628178096542,"metadata":{"connectionId":0,"message":{"type":"request","command":"setBreakpoints","arguments":{"source":{"path":"c:\\Users\\kah6235_aero\\source\\repos\\Blazor\\Blazor.API\\Controllers\\WeatherForecastController.cs","sources":[],"checksums":[]},"breakpoints":[{"line":23,"column":13}],"lines":[23]},"seq":3}},"level":0}
{"tag":"dap.send","timestamp":1628178096543,"metadata":{"connectionId":0,"message":{"seq":5,"type":"response","request_seq":3,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"id":1,"verified":false,"message":"Unbound breakpoint"}]}}},"level":0}
{"tag":"dap.receive","timestamp":1628178097048,"metadata":{"connectionId":0,"message":{"type":"request","command":"setExceptionBreakpoints","arguments":{"filters":[]},"seq":4}},"level":0}
{"tag":"dap.send","timestamp":1628178097048,"metadata":{"connectionId":0,"message":{"seq":6,"type":"response","request_seq":4,"command":"setExceptionBreakpoints","success":true,"body":{}}},"level":0}
{"tag":"dap.receive","timestamp":1628178097051,"metadata":{"connectionId":0,"message":{"type":"request","command":"configurationDone","arguments":{},"seq":5}},"level":0}
{"tag":"dap.send","timestamp":1628178097051,"metadata":{"connectionId":0,"message":{"seq":7,"type":"response","request_seq":5,"command":"configurationDone","success":true,"body":{}}},"level":0}
{"tag":"runtime.launch","timestamp":1628178098079,"message":"Discovered target URL from /json/version","metadata":{"url":"ws://localhost/devtools/browser/f342153a-43f1-47e4-aa02-be5d1eaebf92","fixed":"ws://localhost:54163/devtools/browser/f342153a-43f1-47e4-aa02-be5d1eaebf92"},"level":0}
{"tag":"dap.send","timestamp":1628178101362,"metadata":{"connectionId":0,"message":{"seq":8,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/dap/operation","data":{"errors":[],"initialize":{"operation":"initialize","totalTime":2,"max":2,"avg":2,"stddev":null,"count":1,"failed":0},"!initialize.errors":[],"initialize.errors":[],"setBreakpoints":{"operation":"setBreakpoints","totalTime":0.6,"max":0.6,"avg":0.6,"stddev":null,"count":1,"failed":0},"!setBreakpoints.errors":[],"setBreakpoints.errors":[],"setExceptionBreakpoints":{"operation":"setExceptionBreakpoints","totalTime":0.5,"max":0.5,"avg":0.5,"stddev":null,"count":1,"failed":0},"!setExceptionBreakpoints.errors":[],"setExceptionBreakpoints.errors":[],"configurationDone":{"operation":"configurationDone","totalTime":0.4,"max":0.4,"avg":0.4,"stddev":null,"count":1,"failed":0},"!configurationDone.errors":[],"configurationDone.errors":[]}}}},"level":0}
{"tag":"runtime.launch","timestamp":1628178156552,"message":"Launch returned error","metadata":{"error":{"message":"Unable to launch browser: \"Could not open ws://localhost:1686/_framework/debug/ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"","stack":"Error: Unable to launch browser: \"Could not open ws://localhost:1686/_framework/debug/ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"\n at x.prepareLaunch (c:\\program files (x86)\\microsoft visual studio\\2019\\professional\\common7\\ide\\commonextensions\\microsoft\\jsdiagnostics\\debugger\\debugAdapter\\out\\src\\targets\\browser\\browserLauncher.js:115:19)"},"wasCancelled":true,"name":"x"},"level":2}
{"tag":"dap.send","timestamp":1628178156553,"metadata":{"connectionId":0,"message":{"seq":9,"type":"response","request_seq":2,"command":"launch","success":false,"body":{"error":{"id":9240,"format":"Unable to launch browser: \"Could not open ws://localhost:1686/_framework/debug/ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"","showUser":false}}}},"level":0}
{"tag":"dap.send","timestamp":1628178156555,"metadata":{"connectionId":0,"message":{"seq":10,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/error","data":{"!error":{"error":{"message":"WebSocket was closed before the connection was established","name":"Error","stack":"Error: WebSocket was closed before the connection was established\n at E.close (websocket.js:220:14)\n at webSocketTransport.js:50:16"}},"error":{"error":{"message":"WebSocket was closed before the connection was established","name":"Error","stack":"Error: WebSocket was closed before the connection was established\n at E.close (websocket.js:220:14)\n at webSocketTransport.js:50:16"}},"exceptionType":"unhandledRejection"}}}},"level":0}
{"tag":"runtime.exception","timestamp":1628178156555,"message":"Unhandled error in debug adapter","metadata":{"message":"WebSocket was closed before the connection was established","stack":"Error: WebSocket was closed before the connection was established\n at E.close (c:\\program files (x86)\\microsoft visual studio\\2019\\professional\\common7\\ide\\commonextensions\\microsoft\\jsdiagnostics\\debugger\\debugAdapter\\node_modules\\ws\\lib\\websocket.js:220:14)\n at c:\\program files (x86)\\microsoft visual studio\\2019\\professional\\common7\\ide\\commonextensions\\microsoft\\jsdiagnostics\\debugger\\debugAdapter\\out\\src\\cdp\\webSocketTransport.js:50:16"},"level":3}
{"tag":"dap.send","timestamp":1628178158563,"metadata":{"connectionId":0,"message":{"seq":11,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/error","data":{"!error":{"error":{"message":"read ECONNRESET","name":"Error","stack":"Error: read ECONNRESET\n at TCP.onStreamRead (internal/stream_base_commons.js:209:20)"}},"error":{"error":{"message":"read ECONNRESET","name":"Error","stack":"Error: read ECONNRESET\n at TCP.onStreamRead (internal/stream_base_commons.js:209:20)"}},"exceptionType":"uncaughtException"}}}},"level":0}
{"tag":"dap.send","timestamp":1628178158564,"message":"Message not sent. Connection was closed.","level":2}
{"tag":"runtime.exception","timestamp":1628178158564,"message":"Unhandled error in debug adapter","metadata":{"message":"read ECONNRESET","stack":"Error: read ECONNRESET\n at TCP.onStreamRead (internal/stream_base_commons.js:209:20)"},"level":3}
{"tag":"dap.send","timestamp":1628178161554,"metadata":{"connectionId":0,"message":{"seq":12,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/dap/operation","data":{"errors":[],"launch":{"operation":"launch","totalTime":60108.4,"max":60108.4,"avg":60108.4,"stddev":null,"count":1,"failed":1},"!launch.errors":[{"error":{"message":"Unable to launch browser: \"Could not open ws://localhost:1686/_framework/debug/ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"","name":"Error","stack":"Error: Unable to launch browser: \"Could not open wlocalhost:1686ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"\n at x.prepareLaunch (c:browserLauncher.js:115:19)"}}],"launch.errors":[{"error":{"message":"Unable to launch browser: \"Could not open ws://localhost:1686/_framework/debug/ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"","name":"Error","stack":"Error: Unable to launch browser: \"Could not open wlocalhost:1686ws-proxy?browser=ws%3A%2F%2Flocalhost%3A54163%2Fdevtools%2Fbrowser%2Ff342153a-43f1-47e4-aa02-be5d1eaebf92\"\n at x.prepareLaunch (c:browserLauncher.js:115:19)"}}]}}}},"level":0}
{"tag":"dap.send","timestamp":1628178161554,"message":"Message not sent. Connection was closed.","level":2}
Your config probably needs some attention. In the sections you've labelled Blazor and API they are serving on the same ports: 5000/5001.
You wrote that you are using Edge - for a working config see my answer here.

Visual Studio Console Debug Popup

I've been running some Quickstart samples from IdentityServer4 and found that when I run a web site (e.g. the IdentityServer)... a popup shows up with messages... I am assuming it's either a logger window or the console output... but I have poked around and have no idea how this is done.
Any help?
So... I quickly made a project called test as an example... and in the Properties/launchSettings.json... there were two items under profiles (IIS Express and test)... then when I choose this project there is now, in 2019 at least (maybe I never noticed it before), a new combo box where I can choose between IIS Express and test... when I choose IIS Express it just shows the browser... but when I choose test it shows the browser and a command box with I believe console debugging info.
This maybe be referred to as Self Hosted, but not 100% sure.
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:52015",
"sslPort": 44344
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "weatherforecast",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"test": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "weatherforecast",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

How to set docker network mode in Visual Studio

How can I set the netwerk mode to host in my ASP.NET Core docker container?
I suspect it could be in the launchfile, but there is nothing about network or other docker related setting/flags.
Where can I specify them?
Thanks
On launchSettings.json => docker profile add DockerfileRunArguments as in the sample below:
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_URLS": "http://+:6002",
"ASPNETCORE_ENVIRONMENT": "Dev"
},
"publishAllPorts": false,
"httpPort": 6002,
"useSSL": false,
"DockerfileRunArguments": "--network=your-network -itd --name=web-api"
}
PS: You can use any docker run arguments there.

Solution-wide launchSettings.json

I was wondering what currently the best practise is to gain a solution-wide strongly-typed launchSettings.json inside a solution with web projects (aspnetcore 2.0).
For a single project this doesn't really seem like a problem.
However, for a solution with 3 web projects (client/api/sts) this does seem possible/easy thing to do.
The reason for me asking this is that, for example, the client needs the applicationUrl from the sts and api. The same applies for the sts and api, they all need to know each others location. This combined with a changing applicationUrl for different profiles makes it look like that I kinda have to hardcode magic strings for the urls everywhere. Thus not allowing a single source of truth.
launchSettings.json (currently: x3 -> per web project, goal: 3 urls being reused)
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5000/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"BuildStuff.Client": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:5000/"
}
}
}
Thanks in advance, guidance in the right direction is all I seek.

Application args not being passed when debugging in VS2017

I'm trying to pass command line args to debug my ASP.NET Core application in Visual Studio 2017, but they aren't working. See this screenshot:
I'm trying to pass --App:InstanceName demo as the arguments, but the args[] array is empty.
If I have it write the args to the console and run the application from the command line with ./myApp.exe --App:InstanceName demo then they are correctly passed and output, so it seems to just be a Visual Studio issue.
Edit: Here is the contents of launchSettings.json:
{
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:61313/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"commandLineArgs": "--App:InstanceName demo",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyApp": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:58561/"
}
}
}

Resources