skip to Main Content

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?

2

Answers


  1. The problem may be caused by url rewrite module. You can test a basic web.config file with no URL rewrites.

    You can find a detailed classification of this problem here, I think it should be useful for you:Operation not supported. Unknown error: errornumber

    But if this still not work, you can try run command iisreset.

    Login or Signup to reply.
  2. 1. Source code and IIS deployment directory are same

    If 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)

    2. Trying to debug already deployed code, my site is production environment

    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 studio
    Debug => 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:

    1. Make sure you have deployed latest publish files to IIS 10 otherwise breakpoint wont hit
    2. You can do remote debugging in VS too, no need to open prod environment
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search