Windows 11 ARM - Visual studio IIS Express crash

hjdhfjff

Bit poster
I have a Windows 11 Pro(Version 22H2) 64bit ARM VM created with Parallels (Version 18.0.1 (53056))
I installed net core 5 and 6 for ARM (SDK and hosting bundle)
I created a new net core web application but when I start debug IIS Express didn't start and event viewer error is:

The Module DLL 'C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture

I tried to change app URL port number, delete .vs folder and IIS debug instead of IIS Express

Always the same error

In the past I installed Windows 11 ARM Insider Preview and IIS Express (with the same VS project now I have the problem)
 
Same here, I have exactly the same issue, "iis express" tried to run .net 4.8.1 project, VS always complain with Unable to launch IIS Express Web Server.
Try to run "iisexpress.exe /trace:error" always said error loading global modules. at the end using full local IIS which is not ideal.
 
PS C:\Program Files\IIS Express> .\iisexpress.exe /trace:error
Starting IIS Express ...
Initializing the W3 Server Started CTC = 20912656
W3 Server initializing WinSock. CTC = 20912656
W3 Server WinSock initialized. CTC = 20912656
W3 Server ThreadPool initialized (ipm has signalled). CTC = 20912656
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 = 20913796
W3 Server initializing WinSock. CTC = 20913796
W3 Server WinSock initialized. CTC = 20913796
W3 Server ThreadPool initialized (ipm has signalled). CTC = 20913796
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.

The specified module could not be found.
For more information about the error, run iisexpress.exe with the tracing switch enabled (/trace:error).
 
I'm having the exact same issue, also with a .NET Framework 4.8.1 app built in Visual Studio 2022 ARM on Windows 11 ARM. My app builds, but trying to view it locally in the browser results in a 503 and the app pool crashes with the same error as above: "The Module DLL 'C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture."

I used Microsoft's Error Lookup Tool to get more details about the exact error, and it reported the following (screenshot attached as well):

PS C:\>. \err.exe 000000C1
# for hex Oxc1 / decimal 193
SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION bugcodes.h
ERROR_BAD_EXE_FORMAT winerror.h
# %1 is not a valid Win32 application.
# as an HRESULT: Severity: SUCCESS (0), FACILITY_NULL (0x0), Code Oxc1
# for hex Oxc1 / decimal 193
ERROR_BAD_EXE_FORMAT winerror. h
# %1 is not a valid Win32 application.
# 3 matches found for "000000c1"

.NET Framework 4.8.1 is supposed to fully support ARM, so I don't know why this doesn't work.

If anyone can figure out a fix, I will seriously write you a check! This one issue is preventing me from using my M1 MacBook Pro for work since I need to be able to build and run .NET Framework 4 apps.
 

Attachments

  • Screenshot 2022-12-24 at 1.08.04 PM.png
    Screenshot 2022-12-24 at 1.08.04 PM.png
    56.3 KB · Views: 8
I have the same issue but it seems to be related to microsoft not parallels ...
Did you found a workaround ?
 
Oh man! Any chance you can provide step-by-step directions how to set that up? I'm not familiar with Docker at all.
 
Someone posted a supposed workaround for this issue using Docker, but then deleted it for some reason (that's what I was referring to in my previous post on February 9). Does anyone else know of a workaround?
 
Also have the same error since February, i run Framework 4.8 site on IIS and ever since i installed the dotnet-hosting exe (also tried the latest dotnet-hosting-7.0.5-win.exe ) - whenever i try to access my site i get the "HTTP Error 503. The service is unavailable." error - the application pool stops the in the event viewer i get the error:

"The Module DLL 'C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349."

i installed the dotnet-hosting module because we are in a transition period to .net7, i'm using an M1 Max Mac
Trying to run the .net7 web application also result in the same error.
the only way to succeed in running my FW4.8 site is by uninstalling dotnet-hosting-7.0.5-win.exe
 
Also have the same error since February, i run Framework 4.8 site on IIS and ever since i installed the dotnet-hosting exe (also tried the latest dotnet-hosting-7.0.5-win.exe ) - whenever i try to access my site i get the "HTTP Error 503. The service is unavailable." error - the application pool stops the in the event viewer i get the error:

"The Module DLL 'C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349."

i installed the dotnet-hosting module because we are in a transition period to .net7, i'm using an M1 Max Mac
Trying to run the .net7 web application also result in the same error.
the only way to succeed in running my FW4.8 site is by uninstalling dotnet-hosting-7.0.5-win.exe

Eventually found a "solution" - url-rewrite module (https://www.iis.net/downloads/microsoft/url-rewrite) caused the problem - when i uninstalled url-rewrite, removed it's settings from the web.config and on the application pool to False Both "Enable 32-Bit Applications" and "Enable Emulation on ARM64" - the FW4.8 site loaded correctly without uninstalling dotnet-hosting-7.0.5-win.exe
 
@AviP , holy cow, that did the trick! I didn't even have to uninstall url-rewrite, I just removed the <rewrite> section from my web.config and then set both "Enable 32-Bit Applications" and "Enable Emulation on ARM64" to false like you said, and it worked!

I've only tested this with one project so far, so I'll have to see if my others work the same way, but: this is the first time since I bought my M1 MacBook Pro almost a year ago that I've been able to successfully run a .NET Framework 4 app! This is a huge deal for me since it means I won't have to bounce back and forth between a separate Intel Mac and can have everything I need on one system again.

Thank you, thank you, thank you! Where should I address your check? :D
 
Eventually found a "solution" - url-rewrite module (https://www.iis.net/downloads/microsoft/url-rewrite) caused the problem - when i uninstalled url-rewrite, removed it's settings from the web.config and on the application pool to False Both "Enable 32-Bit Applications" and "Enable Emulation on ARM64" - the FW4.8 site loaded correctly without uninstalling dotnet-hosting-7.0.5-win.exe

I encounter the same problem. How do you uninstall url-rewrite on iis express??

Further, I don't have these two settings in VS2022, as there are no application pools in IIS Express to configure. Where can I set these settings "Enable Emulation on ARM64" and "Enable 32-bit-Applications" for IIS Express?

My app runs on IIS, but not on IIS Express.
 
Unfortunately, none of the above suggestions worked for me.

I have VS2022 just installed on Windows 11 circa October 2024.
I *do not* have url-rewrite installed anywhere.
I *could not* find the <rewrite> text anywhere in any of web.config files on my machine.

Here is how I was able to fix my web project and eventually make it work with IIsexpress on M3 Mac with Parallels.

Add C:\program files\IISExpress to system %PATH%
Open VS 2022 -> Tools -> Options -> type "web projects" in search->Web Projects ->Enable "Use the 64-bit version of IIS express" -> click OK.
Close VS.
Delete entire folder %userprofile%\Documents\IISExpress
Delete entire folder %temp%\IISExpress
Unhide hidden files.
Delete the entire .vs folder inside your project directory.
Open your web project in VS.
Rebuild the project.
Now it should work with IISExpress.

Hope this helps.
 
Back
Top