Precompilation related error from an ASP.NET website that is NOT precomplied

14,490

Somehow a precompiled.config file had made it to production. Don't know how but deleting that file resolved the App_Code directory error and the Application_Start method not being called.

Share:
14,490

Related videos on Youtube

Brian Ogden
Author by

Brian Ogden

LinkedIn: https://www.linkedin.com/in/sweetog

Updated on June 04, 2022

Comments

  • Brian Ogden
    Brian Ogden about 2 years

    I have an ASP.NET website that is XCOPIED to production. I do not publish this website using Visual Studio. I just copy all the aspx and code behind pages to production. There is no publish config file. My production server is running IIS 7.5, integrated pipeline. If I add an App_Code directory to the root directory of the website I get the following error:

    The directory /App_Code is not allowed because the application is precompile

    Another issue I noticed is that my global.asax file's Application_Start is not being called. (I know this for sure as I Throw an Exception from it)

  • mistertodd
    mistertodd over 10 years
    That might happen if you accidentally turned on the option to not delete all files in the target location. And this answer solved my issue. Thank you!
  • Kiquenet
    Kiquenet almost 6 years
    Web Site project or Web Application ?