How to fix ASP.NET error “The file 'nnn.aspx' has not been pre-compiled, and cannot be requested.”?

后端 未结 25 3056
时光说笑
时光说笑 2020-12-05 22:35

I have a VS 2005 web site that I publish using \"Publish Web Site\", and I clear all the three checkboxes. I also have a deployment project that picks up the published files

相关标签:
25条回答
  • 2020-12-05 23:19

    Redeployment of the same files also fixed this issue in my case.

    So maybe before trying anything else first try to deploy you app again (bin folder content should be enough)

    BTW: In my case the error started when C drive run out of space.

    Happy coding! ChiTec

    0 讨论(0)
  • 2020-12-05 23:20

    I had the same problem today. Some forums tell about there is are missing reference in your website and it certainly does in your case. Despite you have all the necessary assemblies included, you might been deploying your website in a IIS server with 3.5 framework, right?

    Well it was my case, so I copied the web.config file from an original ASPX 3.5 website and modified some parts (removed other 3.5 assembly references) and try deploy it again.

    0 讨论(0)
  • 2020-12-05 23:20

    This problem can be caused by many different reasons. Mine was sporadic on pages that woked for a while and suddenly gave the error mentioned. It was a memory pressure related problem
    this thread had the correct answer for me and i've also posted my workaround there.

    0 讨论(0)
  • 2020-12-05 23:21

    I got this error when I upgraded a site from 2.0 to 4.0. The error was caused by a file PrecompiledApp.config in the site's root directory. Once I deleted that file, the site started working.

    0 讨论(0)
  • 2020-12-05 23:21

    This error has occurred to me, and I solved it.

    When you want to publish your site, check use fixed naming and single page assemblies in Visual Studio

    You'll see this problem will be solved!

    0 讨论(0)
  • 2020-12-05 23:25

    Finally, I found the problem. If you use MVC framework like me, please update your MVC version.In my case I changed MVC 4.0.0.0 to 4.0.0.1 and checked all project references's "Local Copy" properties to "True". After that my problem solved. Please check out MVC version in all config file(4.0.0.0->4.0.0.1)

    And watch out asp compiler warning messages.

    0 讨论(0)
提交回复
热议问题