繁体   English   中英

ASP.NET 5 MVC 6在IIS 8中托管应用程序的问题

[英]ASP.NET 5 MVC 6 Issues hosting application in IIS 8

我从Visual Studio 2015在文件系统中发布了ASP.NET 5 MVC 6应用程序,然后将代码复制到IIS服务器,并根据此链接进行了相应配置。

我按照上面链接中的说明创建了一个网站,并将其指向wwwroot文件夹。

当我浏览该站点时,我在IE浏览器中得到404。 所以我要做的是打开wwwroot文件夹下的web.config文件的登录功能。 我将stdoutLogEnabled的值设置为true stdoutLogEnabled="true" 然后,我尝试再次在浏览器中浏览该站点。 在logs文件夹中,我可以看到它正在侦听31581端口。 但是,当我浏览IIS中托管的http://localhost/website_name ,得到404。因此,我查看了事件日志,并得到了与HttpPlatformHandler相关的错误。 请同时参见下面的事件日志。

标准输出日志:

Hosting environment: Production
Now listening on: http://localhost:31581
Application started. Press Ctrl+C to shut down.

事件日志:

The description for Event ID 1001 from source HttpPlatformHandler cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

Process '4784' started successfully and is listening on port '28688'.

这可能是一个已知问题吗? 我看了几篇文章,他们说要卸载并重新安装HttpPlatformHandler 我还重新启动了服务器,看看是否可以解决问题。

正如@Ray在上面的评论中承认的那样,解决方案是将launchsettings.json文件中的端口设置从端口31581修改为80。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM