none
Projects are automatically stopping after running in debug mode

    Question

  • Hello guys:

    I have an emergency here:  I'm developing a web app using ASP.Net MVC in VS 2015 and all of the sudden my project has stopped working; I don't know what has gone wrong.

    Actually, if I run the project using CTRL + F5 (without debugging), it works fine.  It's the debugger mode what's giving me a terrible headache, I'm afraid.  What happens is, I hit F5, and VS seems to do what's proper by opening the web browser (doesn't matter which one I pick, it's the same with all) and then after the browser opens the browser automatically closes and the project stops running. However, as explained before, if I run the project without debuggin (CTRL + F5), the project runs without problems.  I NEED to be able to run it while debugging.

    So I tried opening other projects to check if there was something wrong with this one:  no dice; same problem now applies to all of my projects.

    I went to tools and reset my settings (Import/Export settings):  no dice.

    I uninstalled VS, cleaned the registry, performed restarts on the machine, even defragmented the disk and re-installed VS:  no dice; all my projects keep having the same problem.

    I'm using:

    Visual Studio Community 2015; Version 14.0.23107.0 D14REL; Framework 4.6.00081; Windows 7 Enterprise.

    Could the problem then be more related to IIS Express with Visual Studio?  You know, I'm running the project using IIS Express, but when running without debuggin, IIS Express works fine (like I said, when running without debugging all projects work fine).

    I will appreciate your time for the help you can give with this situation.  I need to resolve this situation ASAP; I haven't been able to work because of this.

    EDIT:

    When running the project with debugging, IIS Express does not start.  That is apparently why the Internet browser immediately closes and the project stops.  However, when running the project without debugging (CTRL + F5) , the IIS Express automatically starts along with the Internet browser and the website.  So, there has to be something going on with the Visual Studio debugger, which doesn't appear to find or connect to IIS Express.  How can I resolve this?

    EDIT:

    The project's Output window shows the following message when the project is automatically stopped:

    The program '[5632] iisexpress.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

    • Edited by KingdomOfCode Sunday, November 08, 2015 12:48 PM new observation
    Saturday, November 07, 2015 9:00 AM

Answers

  • FOUND A SOLUTION THAT WORKED:

    The problem seemed to be related to a recent AVG update (this specific instance of that problem).  I added an exception for devenv.exe, but that didn't work.  What worked was to add the exception for the entire Visual Studio installation folder in Program Files.  Also, I added an exception to the entire installation folder for IIS Express in Program Files, and finally, exceptions to both executables (VS and IIS Express) in my Windows Firewall.

    The next time I ran the project in debug mode to test, it worked!  I never even had to close Visual Studio to perform these exceptions and retry the project.  However, I would advise that if you attempt this fix, to make sure you do it 'the safe way':  make sure Visual Studio is closed, perform the fix, reopen Visual Studio, open your project, clean and rebuild your project and finally run it in debug mode to test it.

    I hope this helps anyone else in future.  Cheers.

    Sunday, November 08, 2015 4:50 PM

All replies

  • FOUND A SOLUTION THAT WORKED:

    The problem seemed to be related to a recent AVG update (this specific instance of that problem).  I added an exception for devenv.exe, but that didn't work.  What worked was to add the exception for the entire Visual Studio installation folder in Program Files.  Also, I added an exception to the entire installation folder for IIS Express in Program Files, and finally, exceptions to both executables (VS and IIS Express) in my Windows Firewall.

    The next time I ran the project in debug mode to test, it worked!  I never even had to close Visual Studio to perform these exceptions and retry the project.  However, I would advise that if you attempt this fix, to make sure you do it 'the safe way':  make sure Visual Studio is closed, perform the fix, reopen Visual Studio, open your project, clean and rebuild your project and finally run it in debug mode to test it.

    I hope this helps anyone else in future.  Cheers.

    Sunday, November 08, 2015 4:50 PM
  • Hi KingdomOfCode,

    I'm glad that you have resolved your problem and thanks for sharing your solution here. Please mark your reply as answer. It is benefit for other communities who has the same problem.

    If any question in future, please feel free to come back to our forum.

    Best Regards,
    Weiwei

    Tuesday, November 10, 2015 3:24 AM
    Moderator
  • Hi Weiwei :-)...  Done!
    Sunday, November 15, 2015 1:04 PM