When I set the ASPNETCORE_ENVIRONMENT
variable to "Development" I get an error page, 502.3 Bad Gateway, when I try to load a page. I'm using ASP.NET Core, Kestrel, and IIS Express in Visual Studio.
Everything works fine if I set ASPNETCORE_ENVIRONMENT
to Staging or Production, and I've also tried commenting out all of the code specific to the Development environment with no luck. There are no errors or warnings in the event viewer. I noticed that a dialog pops up sometimes saying it's loading symbols from Microsoft Symbol Server and it never goes away, so I went to Tools -> Debugging -> Symbols and unchecked Microsoft Symbol Servers. After that, the project works fine.
I've tried clearing the symbol cache and deleting all breakpoints as mentioned in this question, with no luck. Disabling Microsoft Symbol Servers is the only thing that seems to work. This also didn't used to be a problem, but I don't know what I could have changed to cause it.
How is it possible that this would be an issue only when using the Development environment?