简体   繁体   English

网站适用于 Visual Studio 2017 但不适用于 IIS 10

[英]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.我有一个 asp.net Web 应用程序,我试图将它部署到 Windows Server 2016 上的 IIS。我首先在 Visual Studio 2017 上运行该应用程序,它加载并运行得非常好,但是当我在 localhost 上运行它时,它会加载到 IIS 上上面有代码头,没有功能。

网站上加载的代码标头

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.我在这个问题上所做的大部分研究都指出没有启用 HTTP 激活功能,但我已经安装了所有东西,但这个问题仍然没有解决。 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.我尝试过的大多数建议和答案都是针对旧的 IIS 7.5 或 8 而不是我正在使用的 IIS 10.0。 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.该应用程序在 Visual Studio 上运行良好,所以我猜这不是代码问题,而是我的 IIS 配置问题。 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.在使用问题的框架为“IIS 不提供 ASPX 文件”搜索解决方案后,我找到了一个有效的解决方案,该解决方案是转到 IIS -> 选择您的网站 -> 转到处理程序映射,然后按还原到父选项。 Apparently my handler mapping for the website were incorrect or not configured properly but everything works now.显然,我的网站处理程序映射不正确或配置不正确,但现在一切正常。 Thanks for your help.谢谢你的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .net core 2.1 Web应用程序可在Visual Studio中使用,但在Windows 10中部署到IIS时无法使用 - .net core 2.1 web app works in visual studio but does not work when deployed to IIS in windows 10 Response.Redirect()在Visual Studio中工作,但不在IIS中工作 - Response.Redirect() Works in Visual Studio but not IIS 应用程序配置为使用 IIS (Visual Studio 2017/2019) - The Application is configured to use IIS (Visual Studio 2017/2019) 启动IIS Express时发生错误-Visual Studio 2017 - An Error Occured Launching IIS Express - Visual Studio 2017 将IIS中的现有网站添加到Visual Studio 2017中的Git - Adding existing Web Site in IIS to Git in Visual Studio 2017 无法在Visual Studio 2017 RC中启动IIS Express - Unable to launch IIS Express in Visual Studio 2017 RC 无法连接到Windows 10上的SQL Server和使用Visual Studio 2017 - Unable to connect to SQL Server on Windows 10 and using Visual Studio 2017 虽然代码有效,但Visual Studio 2017 Designer的“无效标记”错误 - Visual Studio 2017 Designer 'Invalid Markup' error although code works Visual Studio 2017问题 - Visual Studio 2017 Issues 在Visual Studio 2010和Windows 10中创建虚拟目录,IIS时出错 - Error creating virtual directory, IIS in visual studio 2010 and in windows 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM