简体   繁体   English

ASP.NET和源代码出现

[英]ASP.NET and Source Code Appearing

I have an older ASP.NET web-application using framework 2.0 based on Dot Net Nuke. 我有一个较旧的ASP.NET Web应用程序,该应用程序使用基于Dot Net Nuke的框架2.0。 The web-application used to compile and run but recently it compiles fine but instead of the application running in the browser, source code appears. 用于编译和运行的Web应用程序,但最近编译良好,但是出现了源代码,而不是在浏览器中运行的应用程序。 What could be causing this type of behavior? 是什么导致这种类型的行为? Thank you. 谢谢。

Sounds to me like IIS is treating your .aspx files as static content. 在我看来,IIS将您的.aspx文件视为静态内容。

Open IIS admin and make sure the .aspx extensions are mapped to PageHandlerFactory. 打开IIS管理员,并确保.aspx扩展名已映射到PageHandlerFactory。 Make sure the pages exist in an application (and not just a virtual directory). 确保页面存在于应用程序中(而不仅仅是虚拟目录中)。 Easiest thing to do is open up IIS in a known good environment and compare the setup. 最简单的方法是在已知良好的环境中打开IIS并比较设置。

Also, make sure you have run aspnet_regiis with the appropriate .NET version. 另外,请确保已使用适当的.NET版本运行aspnet_regiis

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

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