Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > The directory /App_Code is not allowed because the application is precompiled

Reply
Thread Tools

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

 
 
Steve Franks
Guest
Posts: n/a
 
      09-14-2005
Thanks again Juan. On a different subject - since we are talking I was
wondering what approach you use to resolve the issue I posted about in a
posting called: "How to remove virtual path from root url of dev web server"
in this newsgroup on August 28. Likewise I have a similiar issue that I
posted about under the subject "Masterpage issue with relative links to
background images" on August 27.

It would be great if you could please share your thoughts on these
challenges.

Thank you,

Steve

"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi, Steve.
>
> What this sounds like is that, at some point, the "Publish Web Site"
> tool was used instead of the "Copy Web" tool, and that the
> "Allow this precompiled site to be updatable" option was not selected.



 
Reply With Quote
 
 
 
 
JeanCastNet JeanCastNet is offline
Junior Member
Join Date: Jun 2010
Posts: 1
 
      06-10-2010
Quote:
Originally Posted by Steve Franks
I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed
in my /App_Code directory. Everything runs fine locally. However when I
use the "Copy Web" function to upload the site to the production server, I
get the following error when trying to run the page on production:
"System.Web.HttpException: The directory '/App_Code' is not allowed
because the application is precompiled."

Anyone know this works fine locally but not on development? How can I
resolve this?

Also on a related note I read a lot about a new "\code" directory in ASP.NET
2.0. Am I correct to assume that at some point they changed this from \code
to \App_Code and these are the same thing?

Steve
The application is being precompiled when you use the "Copy Web" function but retaining the app_code folder.

After you copy it over using the Copy Web function try the following:
1) You can try to manually delete the app_code folder at the production server location after you copy it over.
Or
2) delete the App_Code.dll in the Bin Directory . you may also have a precompiled.config file that is in the root directory of your site that also needs to be deleted .
If you get a Global.ASAX Ambiguous error. then also delete the GlobalAsax.dll in the Bin Directory
 

Last edited by JeanCastNet; 06-10-2010 at 08:53 PM..
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
App_Code/ is not allowed because the application is precompiled =?Utf-8?B?SmltSGVhdmV5?= ASP .Net 1 05-05-2007 01:24 PM
Lost original files issue, error reads 'the directory is not allowed because the application is precompiled' Simon Gare ASP .Net 0 07-30-2006 08:28 AM
the directory is not allowed because the application is precompiled Simon Gare ASP .Net 2 07-20-2006 06:23 AM
Virtual directory error: "directory does not exist or is not accessible because of security settings" Dave ASP .Net 1 10-24-2005 02:05 AM
Server cannot access application directory... The directory does not exist or is not accessible because of security settings. ASP .Net Security 1 05-21-2004 03:47 PM



Advertisments