I have an ASP.NET website running on Win 10 Enterprise, .NET 4.8 and IIS 10. When I open the website in VS 2022 and try to debug an .aspx
webforms page, I get a message
Unable to start debugging on the server. Operation not supported. Unknown error: 0x80004005
VS is using local IIS to run the website. This is happening on my development machine. Both VS and IIS are running with administrator privileges.
This is in the web.config
for the site:
<compilation debug="true" defaultLanguage="c#" targetFramework="4.8">
What can I do so that I can debug pages of this website?
IIS
deployment directory are sameIf you have placed the source code in a directory c:\testdirectory
and pointed the IIS
to above directory
and opened the code from the same directory
Keep the source code directory and IIS
directory separate & debug from source code directory.
You cant use the same directory because IIS 10
and IIS Express
conflict, maybe they try to generate the .dll
at the same time (I suspect)
From a separate source code directory, open the source code in visual studio,
Add debug pointer in your source code file
Go to Debug menu in Visual studioDebug => Attach to process => Select all w2wp.exe instances
The debugger is about to have a 'moment' with the breakpoint when you reload the page
PS:
IIS 10
otherwise breakpoint wont hit