IIS Express crashes when starting a site from visual studio
Asked Answered
L

18

34

I started encountering this problem after installing the Visual Studio 2015 RC; I am no longer able to debug web projects from Visual Studio 2013.

My projects build fine and VS launches a browser - I can see in my output that iisexpress.exe loads all the relevant DLLs for the project, but then right when I would expect to see my website, iisexpress.exe stops running and Visual Studio stops debugging. All the output Window tells me is this:

The program '[3724] iisexpress.exe: Program Trace' has exited with code 0 (0x0).
The program '[3724] iisexpress.exe' has exited with code -532462766 (0xe0434352).

Looking in the event viewer I see the following crash info for iisexpress.exe:

Faulting application name: iisexpress.exe, version: 8.0.8418.0, time stamp: 0x4fbaa9e8
Faulting module name: KERNELBASE.dll, version: 6.1.7601.23040, time stamp: 0x553e86a2
Exception code: 0xe0434352
Fault offset: 0x0000c44d
Faulting process id: 0x1b40
Faulting application start time: 0x01d094d5c74c69d5
Faulting application path: C:\Program Files (x86)\IIS Express\iisexpress.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll

I've tried reinstalling IIS, deleting my local IISExpress folder, and still no luck. Anybody have an idea how I can get IIS running again?

Letitialetizia answered 22/5, 2015 at 21:39 Comment(3)
IIS Express is not IIS. You need to uninstall IIS Express via Programs. Visual Studio 2015 RC ships with IIS 10 Express, which might conflict with Visual Studio 2013's IIS 8 Express. You might go to Programs and uninstall whatever IIS Express you see, and then manually reinstall IIS 8 Express and work with VS 2013. Don't rush to VS 2015, as it is not yet mature.Samite
I have the same issue, It stared the other day, I can be debugging happily, and then all of a sudden i get Access Violation and it will then not work untill I reboot.Malicious
See Also: ASP.NET MVC5/IIS Express unable to debug - Code Not RunningArturo
E
84

In your project folder find the hidden .vs folder and delete it. This solved the problem for me.

Ensign answered 28/2, 2017 at 11:9 Comment(7)
I am helping tutor some students and I am reviewing their code that they send to me. I had the problem described by the OP for many of the projects sent to me when I try to open in visual studio. After trying a few different suggested solutions that did not work, your solution WORKS EVERY TIME this problem occurs and it is a very simple solution. +1Polymorphous
Sometimes you just need a solution to continue to be productive.Ensign
Worked for me too. But if we know the reason / issue details it will be more helpful for all.Kiehl
PS:- May be because this folder contains machine specific info. And if you are using subversion software then chances are this folder is commit by some person and when you update your project this other guys .vs will mess with yours. If this is the case then unversion this folder so as to avoid this error in future.Coeliac
awesome :) you save my time.Payment
In my case the API call to TFS was failing due to incorrect parameter sequence, passing correct parameters worked for me.Defant
Working Fine. Thanks :)Gurgitation
P
11

On my code this error was caused by an infinite loop, try to check if you have a loop like that in the following example:

public int InfinitiveLoop(long param)
{
    return InfinitiveLoop(param);
}
Paratyphoid answered 12/11, 2019 at 11:24 Comment(0)
J
7

Considering faulting module is not on IISExpress's dll files, this might be caused by either your web project or an unknown VS issue.

One thing we can try is to start the problematic web site without using VS. You can execute IISExpress.exe with /siteid option. You can find the site id from applicationhost.config which is placed on the config of IISExpress directory.

For example, if the site id is 2, you can run this command:

"\Program Files\IIS Express\iisexpress.exe" /siteid:2

If the web site still does not work, showing the Access Violation issue which you ran into when you launched the website via Visaul Studio, maybe you will need to narrow down the issue why that happens.

If the web site runs okay if you don't use Visual Studio, it might be caused by some Visual Studio issue. In that case, considering you used RC build of Visual Studio, you will need to upgrade VS 2015 first and check if the issue is still reproducible.

Joeljoela answered 4/9, 2015 at 18:57 Comment(0)
M
2

I just had to delete .suo file of the project and rerun. That solved the problem.

Midian answered 25/1, 2018 at 19:59 Comment(1)
I thought I had this problem fixed by using sony vizio suggestion, but actually my problem was somewhere else.Thousandfold
B
2

Try deleting .vs folder from your project folder. Found the solution here

Bukhara answered 16/6, 2018 at 9:28 Comment(0)
T
2

On top of all answers here, I believe this answer can be helpful to figure it out why this issue occurred: System.StackOverflowException. I started my application without debugging and the two errors were IIS crashed and vstest.executionengine.x86.exe has stopped working (when trying to run the unit tests). Unfortunatelly, in the window event viewer I wasn't able to see the actual error. I saw it just when I started my application with debugger. So, if you have one of these errors, before doing some other investigations, please check your code. Because I was dumb, it took me 1 hour of my work time :(

Thousandfold answered 4/9, 2018 at 11:4 Comment(1)
Yes, this was my problem as well! It's interesting that Visual Studio wouldn't show the exception inline before crashing.Belligerent
I
2

In my case it was a circular reference caused on my part. There was no error, clue, output, any trace of why it was happening which would have saved me an hour or two.

Impartial answered 3/7, 2021 at 14:19 Comment(0)
E
1

I used @kernowcode solution of deleting the .vs folder, and it worked for me. But if you are a newbie like me, you probably have no clue where this .vs folder is.

I found it by opening my folder in the file explorer at the root directory. If you don't see it, you need to show all hidden files. Here are some pictures

1. Right-click on the project and click on "Open Folder in File Explorer"

enter image description here

2. At this point you probably will already see the .vs folder and you can delete it but if you don't, click on view and make sure hidden items is check

enter image description here

3. Delete that .vs sucker and cry no more!

Eula answered 26/10, 2021 at 13:9 Comment(0)
A
1

Above solutions did not work for me. Other projects were starting up debugging fine so it must be some VS problem in this particular project instead of IIS express. What I did is in a new folder pull the entire project from git. It was working then.

Alfons answered 13/11, 2023 at 16:5 Comment(0)
B
0

None of the above answers worked for me but I finally found what my issue was. Hopefully this will help someone down the line.

First run IIS Express from command prompt to validate that the site can or cannot be run.

Im my case, i got an error saying that C:\Windows\Microsoft.NET\Framework64\v4.0.30319\CONFIG\web.config had malformed xml on line 14. Looking at that line in the file it just said null null null null null etc.

The fix for me was to replace the web.config file with one from my coworkers'. IMPORTANT: you must get the file from someone running the same version, ie if you are VS2015 get a copy from someone running VS2015. If you get it from someone running a different version you will see an error saying it could not load an assembly from the manifest.

Hopefully this helps someone that has tried all the suggestions above. I think the cause of this for me was updating from trial mode and adding a product key within VS2017

Bethannbethanne answered 14/12, 2017 at 16:33 Comment(0)
A
0

Clean and build project and it will work

Acetylate answered 31/1, 2018 at 6:2 Comment(0)
S
0

I had a similar issue and this worked for me:

(i). Deleted IISExpress folder in Documents. (ii). Deleted almost everything in temp folder %temp% (may not be necessary but ...) (iii).Went into Control Panel\Programs\Turn windows features off and on and enabled IIS. (iv)Launched VS2013 project and opened and ran much faster with no apparent issue.

Snowball answered 9/2, 2018 at 11:1 Comment(0)
C
0

My symptoms:

  • iisexpress.exe' has exited with code -2146233082 (0x80131506)
  • Starting in VS crashes IISExpress on startup in System.Web without any logging and tracing
  • Starting is possible (As Jeong Hwan Kim mentioned) from command line, but OData und WebAPI do not work

Solution:

I found out, that the application starts from VS when I remove the WebAPI and OData Route (inclusive EnsureInitialized). So I updated all WebAPI libraries to version 5.2.4 and System.Threading to 4.3.0 and all problems vanished.

Counterchange answered 22/2, 2018 at 12:39 Comment(0)
B
0

Open new visual studio project and copy and paste the same project it worked .Sometimes it might be due to visual studio issue. Thanks

Barbados answered 13/11, 2018 at 6:39 Comment(0)
S
0

I just battled with this and my issue was having a different version of Autofac.dll in my web folder than in sub projects. So if you have tried all of these options and nothing works, check your DLL versions...

Schorl answered 11/4, 2019 at 0:13 Comment(0)
R
0

Keep in mind as I didn't realize, the .vs file is a hidden file on Windows 7. Not sure about other OS.

Regress answered 29/6, 2020 at 18:7 Comment(0)
R
0

The problem was caused for me when a method called itself - resulting in an infinite loop.

Resolution, remove the call from the method

Rosemare answered 4/10, 2021 at 16:2 Comment(0)
D
0

In ASP.Net Core, I was missing .Run() method in WebHostBuilder in Program.Cs.

Ideally, the code inside Main method should look something like below:

CreateWebHostBuilder(args).Build().Run();
Decarlo answered 8/1, 2022 at 9:29 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.