12

I am a VS2022 user. I updated it to version 17.5.0. Every time I try to view in the browser, the iisexpresstray (IIS Express) appears. But when you pass the mouse disappears. An error appears in Event Viewer. IIS Express is still working.

Event Viewer


IIS Express tray icon disappears

I have "Reset this PC" three times and reinstalled Win11 and visual studio each time. I also tested on a virtual machine, Win11. Same error. [Windows 11 - 12400 - 16gb - M2 TB]

Also test on my Thinkpad X1 Win10 VS2022 updated to 17.5.0 works fine!

IIS Express tray icon is very useful when testing multiple projects. Lets you know the port used. Any idea ?. Thanks a lot.-

  • 1
    That error code indicates stack overflow, but since it is not open sourced you cannot easily troubleshoot further. – Lex Li Feb 24 '23 at 02:25
  • Thanks for the quick response Lex Li. I would like to know why it only happens to me....lol.- – Ezequiel Revino Feb 24 '23 at 07:05
  • Perhaps that explains why it consumes so much memory.- – Ezequiel Revino Feb 24 '23 at 07:11
  • 3
    I've been getting the same stack overflow exception today, except caught by WER (Event Name: BEX64). I just updated VS 2022 to 17.5 a couple of days ago, so this might be a fresh bug from MS. I found that manually launching the x86 version of IIS Express Tray seems to work (VS launches the x64 version and that one is the one that crashes). Try that as a temporary workaround? – Euro Micelli Feb 24 '23 at 22:41
  • Great. Works for me. Thanks!.- Perhaps the problem is a Win11 update. I think now consumes more memory. Win11 + VisualStudio 2022 + Blazor WASM & SQL SERVER 2012 > 11 GB. My other PC with Win10 VS 17.5 (+ IISExpress64) works OK. Thank you.- – Ezequiel Revino Feb 25 '23 at 01:12
  • 1
    Also, stack overflows are never a problem of general RAM availability or memory consumption by other processes, but of excessive consumption in the process’ thread that crashes. Stacks are relatively small memory areas (measured in megabytes not gigabytes, and that’s are plenty big), and they are pre-allocated at thread creation with a fixed size. A stack overflow happens when a thread asks for more stack space than its preallocated slot. If you were merely running out of useable memory while using more stack, you would get an Out Of Memory error instead of a stack overflow. – Euro Micelli Feb 25 '23 at 01:28
  • (Reposted because I had accidentally dropped a critical word): it is not related to Windows 11. Mine is a windows **10** box – Euro Micelli Feb 26 '23 at 02:09
  • Good Info. I tested v17.6 Preview. Same error. I hope they fix it soon... https://developercommunity.visualstudio.com/t/iisexpress-crashes-in-ntdlldll/10290067 pd: I delete my Virtual machine (created with Microsoft Hyper-V) and memory consumption decreased. – Ezequiel Revino Feb 27 '23 at 07:51
  • @EuroMicelli 's comment worked for me too. You can set VS to use IIS Express x86 by following the steps here: https://stackoverflow.com/questions/16226582/how-can-i-force-iis-express-to-run-in-32-bit-mode. Just have to remember to change it back after this gets fixed – JOpuckman Feb 27 '23 at 16:52
  • 2
    As Michael Bursill says: "Help/Privacy/Privacy Settings… and switched "Yes, I am willing to participate" off and the crash went away." Thanks Michael Bursill. https://developercommunity.visualstudio.com/t/iisexpress-crashes-in-ntdlldll/10290067 – Ezequiel Revino Feb 28 '23 at 01:27
  • Works for me. I hope works for you.- – Ezequiel Revino Feb 28 '23 at 04:12
  • @EzequielRevino, yes that worked for me as well. I have summarized the situation in an answer below for others (I will earn no points from it). Thank you! – Euro Micelli Feb 28 '23 at 20:40

3 Answers3

11

This answer summarizes information from comments and outside sources, for preservation.

This appears to be a bug introduced in Visual Studio 2022 release 17.5.

I discovered that the 32-bit version of IIS Express Tray does not suffer from the same crash. Therefore, as a workaround, you can manually launch the 32-bit version of IISExpressTray.exe, typically under "C:\Program Files (x86)\IIS Express". IISExpressTray.exe will automatically recognize running IIS Express web processes regardless of their bitness. You don't need to switch to 32-bit web processes for this workaround.

The bug has been reported to Microsoft by another user here: https://developercommunity.visualstudio.com/t/iisexpress-crashes-in-ntdlldll/10290067

The poster of the bug report looked at a crash dump and discovered that the crash happened while processing telemetry data. Then they confirmed that deactivating participation in the Visual Studio Experience Improvement Program would work around the bug entirely.

To deactivate participation in the Visual Studio Experience Improvement Program: Open Visual Studio 2022. Go to Help -> Privacy -> Privacy Options.... Then, near the bottom of the dialog, select "No, I would not like to participate". Please consider rejoining the program once the bug is fixed by Microsoft.

At the time of this writing the bug has been triaged but not yet resolved.


Update: Microsoft indicates that this issue was resolved in Release 17.5.4 (April 12 2023) (https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes#17.5.4)

Euro Micelli
  • 33,285
  • 8
  • 51
  • 70
  • This again confirms never to check "collect my data" for any product you install. Disabling the option worked for me too. – Dave de Jong Apr 07 '23 at 13:56
0

Until the bug is fixed, you can uninstall IIS Express, download from https://www.microsoft.com/en-us/download/details.aspx?id=48264 and install. I need to do this after each VS 2022 updates.

morindo
  • 96
  • 2
  • 7
0

This problem started for me when I updated Microsoft.AspNet.WebApi,

 Microsoft.AspNet.WebApi.Client, Microsoft.AspNet.WebApi.Core, 
 Microsoft.AspNet.WebApi.WebHost, From Version 5.2.6 to version 5.2.9. 

The VS Update 17.5.4 did not resolve. When I rolled back the Microsoft.AspNet.WebApi versions to 5.2.6 it resolved.

Sajed
  • 1,797
  • 2
  • 7
  • 21