我在一台装有Windows 11 for ARM64和Parallels的M2 Mac上运行了Visual Studio Community Edition 2022.

我让应用程序(.NET4.8WebForms)在本地IIS上运行,但不是在IIS Express上运行.IISExpress启动失败,并显示"ERROR LOAD 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)

你知道怎么解决这个问题吗?

推荐答案

默认情况下,IIS Express附带ASP.NET核心模块.然而,由于a known issue的原因,在其ARM64安装程序中附带的ASP.NET核心模块的Bitness是错误的,这就是您描述的这个错误的原因.

虽然最终的修复程序应该是打了补丁的安装程序,这可能不会很快到来,但您可以打开ApplationHost.config文件(隐藏在项目文件夹的.vs文件夹中),并从模块列表中手动删除ASP.NET核心模块.

Asp.net相关问答推荐

无法为媒体类型application/x-www-form-urlencoded生成样本

将 NUnit 添加到 ASP.NET MVC 测试框架的选项中

你能从请求变量中确定时区吗?

使用 Owin 身份验证的服务器端声明缓存

如何从 RouteData 获取路由名称?

在 ASP.NET 中将虚拟路径转换为实际 Web 路径

更改后未应用 CSS

如何在 ASP.NET 中仅在调试模式下执行代码

如何设置默认页面 asp.net

修改 web.config 时如何防止 ASP.NET 应用程序重新启动?

如何从 ASP.Net 发布然后重定向到外部 URL?

如何验证用户在 CheckBoxList 中 Select 了至少一个复选框?

如何删除asp.net中的特定会话?

Azure Functions 中的 DI

MVC3 和实体框架

当用户在文本框中按 Enter 键时执行按钮单击事件

LinkBut​​ton 向 OnClick 后面的代码发送值

如何在 asp.net 中实现Access-Control-Allow-Origin标头

在没有等待 #2 的情况下调用异步方法

如何在asp.net的GridView中按列名而不是按索引获取单元格值