Search code examples
asp.netvisual-studiovisual-studio-2022iis-expressparallels

IISExpress not starting on ARM64 Mac / .NET 4.8


I run Visual Studio Community Edition 2022 on a M2 Mac under Parallels with Windows 11 for ARM64.

I got the application (.NET 4.8 Webforms) running on the local IIS, but not on IIS Express. IISExpress startup fails with "Error loading global modules".

PS C:\Program Files\IIS Express> .\iisexpress.exe /trace:error
Starting IIS Express ...
Initializing the W3 Server Started CTC = 1389375
W3 Server initializing WinSock.  CTC = 1389390
W3 Server WinSock initialized.  CTC = 1389390
W3 Server ThreadPool initialized (ipm has signalled).  CTC = 1389390
Failed processing with hr = 8007007e
Error loading global modules.  hr = 8007007e
Terminating W3_SERVER object
Start listenerChannel http:0
Initializing the W3 Server Started CTC = 1390546
W3 Server initializing WinSock.  CTC = 1390546
W3 Server WinSock initialized.  CTC = 1390546
W3 Server ThreadPool initialized (ipm has signalled).  CTC = 1390546
Failed processing with hr = 8007007e
Error loading global modules.  hr = 8007007e
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Waiting for all LISTENER_CHANNELS to stop
Unable to start iisexpress.

Das angegebene Modul wurde nicht gefunden.
For more information about the error, run iisexpress.exe with the tracing switch enabled (/trace:error)

Any idea how to fix that?


Solution

  • IIS Express ships with ASP.NET Core module by default. However, due to a known issue the bitness of ASP.NET Core module shipped in its ARM64 installer was wrong and that's the cause of this error you described.

    While the ultimate fix should be a patched installer, which might not come quickly, you can open the applicationHost.config file (hidden in .vs folder of your project folder) and delete ASP.NET Core module from the module list manually.