ASP.NET MVC5 / IIS Express cannot debug - code does not work

I launched the VS2013 VB.Net MVC5 web application, set a breakpoint in the HomeController About method and launched the "Start debugging" page, go to the "About" page and get the message "Code not running - The current Thread is not currently running or the call stack could not be obtained" preventing any debugging.

If I set a breakpoint in Global.asax Application_Start, the breakpoint will work fine. The change "Enable editing and continued" does not matter.

Anyone have any ideas what is going on?

Refresh . My environment was Windows 8.0 Pro with VS2013 Ultimate.

Since then I have reset my system and made a completely new installation of Windows 8.1 Pro, VS2010 Ultimate, VS2012 Ultimate and VS2013 Ultimate.

The same tests performed in all three versions of VS - File> New Project> MVC (default). All 3 VS versions report " Process with an Id of xxx is not running. "

VS2013 debugging debug reports "The program '[7720] iisexpress.exe: Program Trace' has exited with code 0 (0x0). The program '[xxxx] iisexpress.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'. "

I ran VS in and out of admin mode and got the same results. I uninstalled and reinstalled IIS Express 8.0.

+37
visual-studio-2013 asp.net-mvc asp.net-mvc-5 iis-express visual-studio-debugging
Oct. 20 '13 at 0:40
source share
16 answers

The solution to this problem was simple. Close the development environment, go to the Documents folder and rename IISExpress. Now set the environment variable _CSRUN_DISABLE_WORKAROUNDS (ref: http://gauravmantri.com/2013/02/05/workaround-for-iis-express-crashing-when-running-windows-azure-cloud-service-web-role-with- multiple-instances-in-windows-azure-sdk-1-8-compute-emulator / ).

Now restart your computer, start VS, load the website and run it in debugging. IIS automatically restored the IISExpress folder and resolved conflicts of environment variables.

+10
Oct 28 '13 at 3:07 on
source share

For me, the solution was much simpler. In my solution explorer in Visual Studio, I right-click on a web project, select properties, and then go to the Internet tab. From there, I changed the project URL to a different port number. For example, if it was http://localhost:1052 - I changed it to http://localhost:4356.

Process with an Id of xxx is not running.

Not sure if this helps anyone else, but it worked for me - I hope it works for you too!

+43
Mar 21 '14 at 12:23
source share

If you are using a 64 bit machine

Go to Visual Studio> Tool Menu> Options

Options window with Projects and Solutions> Web Projects selected and option Use the 64 bit version of IIS Express selected

+29
May 26 '15 at 9:56
source share

I had the same problem and my solution was as follows:

Instead of deleting the main applicationhost.config (in the "Documents / IIS Express" folder), check the solutions folder for the hidden ".vs" folder with the "config" subfolder. If this folder exists and it has its own applicationhost.config file, you need to either rename (or delete) this file, or edit it and make sure that the websites configured inside correspond to ASP.NET web applications in your solution what are you trying to debug. Hope this helps.

+29
Jul 26 '16 at 20:03
source share

I had a similar problem when switching from Visual Studio 2013 to Visual Studio 2015 in an MVC project.

Removing the entire .vs solution worked like a charm, as Johan J v Rensburg pointed out.

+17
Jan 18 '17 at 10:00
source share

Well, for me this caused the Telerik JustMock Q3 2013 (13.3.1015.0) problem. Deleted it with VS 2013 and the problem disappeared.

see also ASP.NET-MVC4 code does not work and http://feedback.telerik.com/Project/105/Feedback/Details/63749-unable-to-debug-asp-net-projects-with-q3-2013

One lost day and a lot of new white hair ... Curse on you guys Telerika!;)

+10
Oct 30 '13 at 18:31
source share

The following steps fix the problem for VS 2015 and VS 2017:




Close VS.

Go to the solution folder and delete the hidden folder .vs.

open VS.

Hit F5 and IIS Express should load as usual, allowing you to debug.

+9
Feb 20 '18 at 7:44
source share

Another scenario may be that the port that IIS uses for your application is already in use by another running application. Try changing the port and see if it works for you.

+3
Sep 10 '14 at 16:10
source share

I started this problem with Asp.Net Core Web Applications in Visual Studio 2017 . It doesn't matter if it was a version of .Net Core Standard with .Net 4.5.2 or Core with 1.1 in my case. IISExpress crashed when I started debugging.

I tried everything, nothing worked, until I went into add / remove programs in Windows 10 , and I removed .net core 1.0 runtime (I installed both 1.0 and 1.1). Once this was removed, I launched Visual Studio 2017 and my .Net Core Web applications (both), and they both started working again!

+2
Apr 28 '17 at 18:25
source share

A similar problem occurs in the aspdotnet kernel with the same error: The program '[xxxx] iisexpress.exe' has exited with code -1073741816 (0xc0000008).

Setting up the log file in web.config also did not generate any information:

 <aspNetCore stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" /> 

To find the exact error, the next step with the log information on the command line helped:

 > dotnet restore > dotnet run 

In my case, the problem was installed in the dotnet v 1.0.0 kernel, and version 1.0.1 had to be installed globally.

+1
Oct. 14 '16 at 14:22
source share

Go to the project directory.vs / config / and delete applicationhost.config. Then restart the project.

+1
Mar 16 '18 at 7:10
source share

I solved this problem for me. Try changing all Deny values ​​to Allow in the %SYSTEM_DRIVE%\Program Files\IIS Express\AppServer\applicationhost.xml . Please consider which IIS Express Web Server you use in the settings of Visual Studio, 32-bit or 64-bit, this means that I have to check the file in different folders. Then restart Visual Studio. I don’t know about security issues for these configuration lines, so change them at your own risk, but it solved my problem.

 <section name="asp" overrideModeDefault="Allow" /> <section name="caching" overrideModeDefault="Allow" /> <section name="cgi" overrideModeDefault="Allow" /> <section name="defaultDocument" overrideModeDefault="Allow" /> <section name="directoryBrowse" overrideModeDefault="Allow" /> <section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Allow" /> <section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Allow" /> <section name="handlers" overrideModeDefault="Allow" /> <section name="httpCompression" overrideModeDefault="Allow" /> <section name="httpErrors" overrideModeDefault="Allow" /> <section name="httpLogging" overrideModeDefault="Allow" /> <section name="httpProtocol" overrideModeDefault="Allow" /> 

and etc.

0
Nov 27 '16 at 23:21
source share

Delete the file C: \ Users \ congt \ Documents \ IISExpress

0
Nov 28 '17 at 11:58
source share

None of the above answers worked for me, but I finally found that my problem. Hope this helps someone come down.

Start IIS Express from the command line first to verify that the site may or may not be running.

https://docs.microsoft.com/en-us/iis/extensions/using-iis-express/running-iis-express-from-the-command-line

In my case, I got a message saying that C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ CONFIG \ web.config was looking for xml in line 14. Looking at this line in the file, he simply said null null null null null null, etc.

The fix for me was to replace the web.config file with one of my staff. IMPORTANT , you must get the file from someone who works with the same version, that is, if you get VS2015 a copy from someone who runs VS2015. If you get it from someone who runs another version, you will see an error stating that you cannot load the assembly from the manifest.

Hope this helps someone who has tried all of the above suggestions. I think the reason for this for me is updating from trial mode and adding a product key in VS2017

0
Dec 14 '17 at 16:27
source share

In my case, the problem was that the virtual directory was not created.

  1. Right-click the web project file and go to Properties
  2. Go to website
  3. Scroll down to Project Url
  4. Click the Create Virtual Directory button to create a virtual directory

enter image description here

0
Aug 10 '18 at 19:09
source share

Solution: For me, the problem was with active Chrome sessions. I closed all Chrome browser sessions and then tried to build Chrome again. I am using Visual Studio Professional 2017 version 15.3.2. The VS application that I came across with build errors was a WebAPI project. When I tried to press the green play button, I received the error message "The program could not start" : http: // localhost: 18980 / ". The operation in the current state is not valid. I hope this post helps someone.

0
Dec 30 '18 at 1:19
source share



All Articles