I was hoping to be able to specify CORS related configuration for IIS Express within the launchSettings.json file of my ASP.NET Core application. I've tried searching for examples, tutorials or documentation related to configuring IIS Express with launchSettings.json but so far have not had much luck with that. This page shows how to configure IIS itself to specify response headers using xml: https://learn.microsoft.com/en-us/iis/extensions/cors-module/cors-module-configuration-reference. My ASP.NET Core application targets .NET Core 2.1 currently. Thoughts? I'm not sure if this is even possible or if I need to just use regular IIS instead of IIS Express.
No. launchSettings.json
is only honored by dotnet run
and other .NET Core tooling, not by IIS Express.
You can switch to full IIS for development, or use the CORS module for IIS upon IIS Express (the actual steps are too complicated without PowerShell scripts written by me).