ASP.NET MVC 5 6在问题8 IIS应用程序托管 [英] ASP.NET 5 MVC 6 Issues hosting application in IIS 8

查看:288
本文介绍了ASP.NET MVC 5 6在问题8 IIS应用程序托管的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发表了ASP.NET MVC 5 6在文件系统从Visual Studio 2015年应用程序,然后我复制了code到IIS服务器,并根据此的链接

I published ASP.NET 5 MVC 6 application in file system from Visual studio 2015 and then I copied over that code to IIS server and configured accordingly as per this link.

我创建了一个网站,并指出它wwwroot文件夹按在上面的链接说明。

I created a website and pointed it to wwwroot folder as per instructions in above link.

当我浏览该网站,我得到404 IE浏览器。所以,我所做的是我打开日志记录在web.config文件是wwwroot文件夹下。我stdoutLogEnabled的值设置为true stdoutLogEnabled =真正的。然后我试图再次在浏览器的网站。在日志文件夹,我可以看到它是在31581端口监听。但是,当我浏览的http://本地主机/ WEBSITE_NAME 在IIS托管,我得到404所以我看了看事件日志,我得到有关<$ C错误$ C> HttpPlatformHandler 。请参阅事件日志以下为好。

When I browse the site, I get 404 in IE browser. So what I did is I turned on logging in web.config file which is under wwwroot folder. I set the value of stdoutLogEnabled to true stdoutLogEnabled="true". And then I tried to browse the site in browser again. In the logs folder, I can able to see that it is listening on 31581 port. But when I browse http://localhost/website_name that is hosted in IIS, I get 404. So I looked at the event logs and I get error related to HttpPlatformHandler. Please see below event log as well.

标准出来日志:

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 。我也重新启动服务器,看看是否能解决问题。

Could this be a known issue? I looked at several articles and they say to uninstall and reinstall HttpPlatformHandler. I also rebooted the server to see if that fixes the issue.

推荐答案

由于@Ray上述评论承认,解决方法是修改端口设置在launchsettings.json文件从端口31581至80

As @Ray acknowledged in comment above, solution is to modify the port setting in the launchsettings.json file from port 31581 to 80.

这篇关于ASP.NET MVC 5 6在问题8 IIS应用程序托管的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆