2016-01-13 86 views
0

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

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

当我浏览网站时,我在IE浏览器中得到404。所以我做的是打开wwwroot文件夹下的web.config文件。我将stdoutLogEnabled的值设置为true stdoutLogEnabled="true"。然后我试图再次浏览浏览器中的网站。在日志文件夹中,我可以看到它正在监听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。我也重启了服务器,看看是否解决了这个问题。

+0

发生了什么端口设置://本地主机:31581?这个问题绑定到80端口,浏览您的站点,而站点托管在31581上,您可以在IIS中或通过配置更改该端口。 – lazy

+0

我可以使用'localhost:31581'浏览。我相信当您通过IIS浏览网站时,应用程序会自动生成该文件。 – Ray

+1

您需要修改IIS中的绑定。另请查看properties文件夹中的launchsettings.json以配置IIS Express的端口号或您正在使用的配置 – lazy

回答

2

正如@Ray上述评论承认,解决办法是,当你导航到http修改从端口31581的launchsettings.json文件80