ASP.NET Core模块不在IIS中 [英] ASP.NET Core module not in IIS
问题描述
I am keep getting 500.19(0x8007000d) error when running my .NET core project through IIS Express.
After a bit digging, it looks like IIS doesn't recognize <aspNetCore>
as a valid element in the web.config.
这是我尝试过的事情:
- 按照有人建议的方式安装了URL重写模块
-
AspNetCoreModule
穿过这里: https://www.microsoft.com/net/download/dotnet-core/runtime-2.0.5 . - 已安装.NET Core Windows Server Hosting捆绑包.
- installed URL rewrite module as someone suggested installed
AspNetCoreModule
throgh here: https://www.microsoft.com/net/download/dotnet-core/runtime-2.0.5.- installed .NET Core Windows Server Hosting bundle.
我尝试将其添加为托管模块,并放置AspNetCoreModule
的路径,但是看起来它不能解决问题.启用stdoutLog不起作用,因为它根本不会生成任何日志文件.
I've tried adding it as a managed module and put the path for AspNetCoreModule
, but looks like it doesn't fix the issue. Enable stdoutLog doesn't work, because it simply won't generate any log file.
关于如何解决此问题的任何想法?
Any idea on how to solve this?
推荐答案
我终于开始工作了.因为我所有的网站都在默认网站下,所以我去为默认网站安装AspNetCoreModule
模块.
I got it working finally. Because all my website is under the default website, I went to install AspNetCoreModule
module for the default website.
安装后,我注意到默认网站下的web.config发生了变化.同时,AspNetCoreModule
模块在模块部分中也列为本机模块.
After it was installed, I noticed a change in the web.config under the default website. At the same time, AspNetCoreModule
module is also listed as Native module in the module section.
真正的错误消息是web.config试图安装AspNetCoreModule,但已安装它.然后我删除了默认网站下web.config中的<modules>
部分,它起作用了...
The real error message is web.config was trying to install AspNetCoreModule, but it is already installed. Then I deleted the <modules>
section in the web.config under the default website and it worked...
在我关闭/打开Windows IIS功能之前,该网站曾经可以正常工作.真的不确定是什么原因造成的...
The website used to work before I turned off/on windows IIS features. Really not sure what caused this...
这篇关于ASP.NET Core模块不在IIS中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!