Asp.net web applications fail to debug on fresh install

Shane 1 Reputation point
2021-11-08T09:31:48.27+00:00

I’ve recently had to do a fresh install of windows which has me reinstalling Visual Studio and IIS.
Since doing this I cannot debug any Asp.net Web application, I can create any type be it windows forms, empty all will not load correctly in to debug.
A single page will load up looking to attempt but then immediately Visual Studio goes in to break mode with the following error.

147289-image.png

I can attempt to continue execution which continues with errors.
In the output I get the following:
The runtime has encountered a fatal error. The address of the error was at 0xf0d444e2, on thread 0x3ff0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.

The program ‘[16508] iisexpress.exe’ has exited with code -1 (0xffffffff).

I run Visual Studio as Administrator, I’ve reinstalled IIS multiple times,
Set IIS to allow 32bit applications.
Tried to change the port which it loads on.
Visual studio is 2017 edition.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,998 questions
Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,200 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,026 Reputation points
    2021-11-09T03:11:10.337+00:00

    Hi @Shane ,
    Do you have the managed codes? Wheather your problem is caused by unmanaged part of the code somewhere else?
    Best regards,
    Yijing Sun


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.