简体   繁体   中英

Website works on visual studio 2017 but not IIS 10

I have a asp.net web application that I am trying to deploy to IIS on Windows Server 2016. I first ran the application on Visual Studio 2017 and it loads and runs perfectly fine but on IIS when I run it on localhost it loads up but with the code headers on it and no functionality.

网站上加载的代码标头

There are no errors thrown from the browser perspective or event logs so I don't know how to troubleshoot specifically. Most of the research I have done on this issue points to not having HTTP activation feature enabled but I have installed everything and still this issue has not been resolved. Most of the suggestions and answers I have tried were for the old IIS 7.5 or 8 not IIS 10.0 which I am using. The application runs fine on visual studio so I'm guessing that it is not a problem with the code but with my IIS configuration. I'm hoping someone can help me or at least point me in the right direction. This is my first question ever so I'm not sure what else is needed (ie code, specifics) for me to get a proper answer. I will provide what is needed. Thank you

Thanks for your comments guys. After searching for solutions using the framing of the question as "IIS not serving ASPX files" I found a solution which worked which was to go IIS -> select your website -> go to handler mapping and then press revert to parent option. Apparently my handler mapping for the website were incorrect or not configured properly but everything works now. Thanks for your help.

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