简体   繁体   中英

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

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 .

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

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.

Standard out log:

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

Event logs:

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'.

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。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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