We are developing an (internal) web service based on asp.net 4.8, with a fairly extensive REACT SPA front end.
For debugging purposes during development, we run an IIS server on the local (development) machine, and we do something separate to run a proxy web server for debugging the .js front end SPA (not relevant to the question at hand).
When we start up a Debug session in Visual Studio (2019), VS starts with "Contacting web server to start debugging" and then locks for a time. It clearly does something to start the web server (w3wp.exe
), and waits for some reply, before doing what it is told to do in the "Start Action" section of the Web tab on the project properties page.
This is problematic behaviour because it does not attach to w3wp.exe
until after it finishes it's "contacting web server to start debugging" operation. This is a huge problem, as our w3wp.exe
starts doing all kinds of things that we have no visibility into.
So, can anyone explain to me:
- What does VS actually do to "contact the web server"?
- Can this be controlled? If so, how?
- Can I get the debugger to attach to
w3wp.exe
right away? - Why does
w3wp.exe
start up and load its collection of binaries, only unload them and reload them, sometime multiple times?
In short, what the actual heck is going on under the covers at startup?
This (Identity Server 3 Contacting the web server hangs when launching debug mode) question and answer seem irrelevant to my situation
I note the field Override application root URL
in the Servers
section of the Web
tab of the project properties and had hoped this might have something to do with it, but I cannot see any relation.