C# ASP.NET 5 MVC 6在IIS 8中发布托管应用程序

C# ASP.NET 5 MVC 6在IIS 8中发布托管应用程序,c#,asp.net,iis,asp.net-core,asp.net-core-mvc,C#,Asp.net,Iis,Asp.net Core,Asp.net Core Mvc,我在Visual studio 2015的文件系统中发布了ASP.NET 5 MVC 6应用程序,然后将该代码复制到IIS服务器,并根据此代码进行相应配置 我创建了一个网站,并按照上面链接中的说明将其指向wwwroot文件夹 当我浏览网站时,我在IE浏览器中得到404。所以我所做的就是打开了wwwroot文件夹下的web.config文件。我将stdoutLogEnabled的值设置为truestdoutLogEnabled=“true”。然后我再次尝试在浏览器中浏览该网站。在logs文件夹中,

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

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

当我浏览网站时,我在IE浏览器中得到404。所以我所做的就是打开了wwwroot文件夹下的web.config文件。我将stdoutLogEnabled的值设置为true
stdoutLogEnabled=“true”
。然后我再次尝试在浏览器中浏览该网站。在logs文件夹中,我可以看到它正在31581端口上侦听。但是当我浏览
http://localhost/website_name
托管在IIS中,我得到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'.
事件日志:

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

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

导航到时会发生什么?该问题绑定到端口80,您在该端口导航浏览站点,而站点位于31581上,您可以在IIS中或通过配置进行更改。我可以使用
localhost:31581
进行浏览。我相信,当您通过IIS浏览站点时,应用程序会自动生成这些内容。您需要修改IIS中的绑定。另外,请查看属性文件夹中的launchsettings.json,以配置IIS Express的端口号或您正在使用的配置在更新launchsettings.json文件中的端口绑定后,我可以浏览应用程序:)@Ray post作为答案并接受它。当您导航到时会发生什么?该问题绑定到端口80,您在该端口导航浏览站点,而站点位于31581上,您可以在IIS中或通过配置进行更改。我可以使用
localhost:31581
进行浏览。我相信,当您通过IIS浏览站点时,应用程序会自动生成这些内容。您需要修改IIS中的绑定。另外,请查看属性文件夹中的launchsettings.json,以配置IIS Express的端口号或您正在使用的配置在更新launchsettings.json文件中的端口绑定后,我可以浏览应用程序:)@Ray post作为答案并接受它。