0

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?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Sam
  • 4,994
  • 4
  • 30
  • 37

2 Answers2

1

I was struggling with this for a long time and managed to solve this by adding "clear" to the tag below:

<environmentVariables>
    <clear />
    <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="branch" />
</environmentVariables>
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Abierto
  • 11
  • 1
0

msdl.microsoft.com is the symbol server and it was down earlier. Since you asked it to get the debug symbols with that checkbox selected.

mvermef
  • 3,814
  • 1
  • 23
  • 36