IISExpress crashes with 0xc0000008 error
Asked Answered
D

3

44

Occasionally when running my MVC4 site in VS2012 using IISExpress I get the following error and IISExpress stops:

iisexpress.exe: Managed (v4.0.30319)' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified

There is nothing in the event log for this and I cant find anything on the interweb.

I have some very vague theories:

  • my site is using MEF a loads modules dynamically at startup. Maybe there is an occasional race condition so IIS cant open an assembly but my trace logs show that IIS is beyond that part of the startup cycle.
  • it also has SignalR but apart from starting the hub it's not doing much yet. SignalR is pretty new and unproven but I've updated the latest RC2 version with the same result.

Oh and I also had the same error when using the VS Dev web server. I havent tried full IIS yet.

Anyone else go a clue ??

Thanks

UPDATE:

I fixed a couple of nuget references which seemed to stabalize things a bit, then this morning it happened again. The VS output window shows this:

'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mobile\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\peter.jones\AppData\Local\Temp\Temporary ASP.NET Files\root\a4aa93f7\dfa23a50\App_Web_rpzlbjhw.dll', Symbols loaded.
'iisexpress.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\peter.jones\AppData\Local\Temp\Temporary ASP.NET Files\root\a4aa93f7\dfa23a50\App_Web_c1rjct4s.dll', Symbols loaded.
The program '[11072] iisexpress.exe: Managed (v4.0.30319)' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.

If there is some more useful logging somewhere I will happily provide it.

Cheers

Denson answered 10/2, 2013 at 22:45 Comment(14)
Do you have one of the below Windows update installed on the machine?(support.microsoft.com/kb/2750149 for windows 8 and support.microsoft.com/kb/2750147 for Windows 7 platform.)Waldenburg
No, I dont have that installed. Will try, but why do you think this will help? I cant see anything in the readme about IIS or the error number.Denson
Can you please email us a small repro at [email protected]? Did you try attaching debugger to iisexpress before it crashes and see if you can get a stack trace?Waldenburg
If I could get it to fail predicably then I would be happy to do this but currently, it happens seamingly randomly.Denson
Can you try the same in IIS? Enable Failed Request trace logging in IIS to capture errors. technet.microsoft.com/en-us/library/cc725786(v=WS.10).aspxWaldenburg
I also get this error sometimes. I´m working with VS2012 and develop a silverlight+wcf ria services application.Oscillator
My feeling is that this may have something to do with MEF (Composition) but I have no evidence for this... just a hunch.Denson
I'm not using MEF or SignalR but am also seeing this behavior.Freezing
Using MVC4 and VS 2012 I get the same from time to time. I just attribute this behaviour to Microsoft's way of doing things, ==> []Levity
Have tried installing the Windows 8 update above (support.microsoft.com/kb/2750149) - problem still persists using MVC4 and VS2012.Walachia
may be you have other web servers running on your machine ?Ardellardella
No other web servers installed. I've got a brand new machine without IIS installed and it still happens. 2 other devs in my team have the same problem also (with and without IIS installed). We've also updated to VS12 Update 3.Denson
you don't happen to be using Trusteer Rapport on your network do you? That security app has known issues with IIS and the VS DebuggerBrittne
I'm getting the exact same problem but in a WebForms application in VS2015 (.NET 4.6). Occasional drops after starting the debugger. Happens 2-3 times a day; one in 30 starts of debug sessions. The program '[16736] iisexpress.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.Purdum
V
2

vs2013 -> tool -> option -> project & solution-> web project -> cancel use IIS Express 64

Hope this can help you!

Vermis answered 13/3, 2014 at 9:43 Comment(2)
Not sure why this is downvoted... this answer on similar question has several upvotes (although I guess it's the opposite situation though: checking vs unchecking).Slapup
+1 Yeah, this fixed my problem but in the reverse direction. This maybe should be the selected answer. Thanks @Ruan.Cchaddie
Z
1

Enable Failed Request trace logging in IIS to capture errors

link here

and you can get more information about the thread on IIS forums

Good luck!

Zusman answered 22/8, 2013 at 12:37 Comment(3)
sorry don't have privilege to post more links :(Zusman
Is this possible to enable in IIS Express?Slapup
The question was about IIS Express.Nobile
H
1

This appear to be an occurrence in VS from VS2010 onwards and the Cannot run program using debugger has a reference to particulat error number and exception 0xC0000008 mentions the particular exception.

This link AjaxControlToolkit Error with PopupControlExtender also references both the Exception and error number at the bottom of the second stack trace and the OP went on to resolve the issue.

All the links / recommendations and links to the MS connect log for the fault. Hope this can help you get a little bit further along in your quest for an answer.

Homunculus answered 21/11, 2013 at 8:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.