Solved

Building and deploying 2.0 web application - The directory "WebAppName/App_WebReferences" is not allowed because the application is precompiled.

Posted on 2008-06-16
7
3,908 Views
Last Modified: 2013-11-26
I am getting these errors when deploying my web applciation (VS.NET 2.0) to Win2003 SP2, iis6.0.
- The directory "WebAppName/App_WebReferences" is not allowed because the application is precompiled.
If I delete the App_WebReferences folder, the next error is The directory.../App_Code.... is precompiled.

After searching around on EE I found a thread (below) that mostly described some options to try by I'm not clear on the specific steps.
Here's what is happening:
1. Right-click the web app and select BUILD WebSite
2. Copy the folder containing the web application and all its contents to the web server where it will be deployed (this is a "test" environment).
3. Run the web app:  http://..../default.aspx
4. I receive these errors
The directory "WebAppName/App_WebReferences" is not allowed because the application is precompiled.
And If I delete that folder...
The directory "WebAppName/App_Code" is not allowed because the application is precompiled.

5. The thread from EE says to build the application differently follow these steps:
How to change the project to Uncompiled:

    1. Go to your project properties page
    2. Select the Build Option
    3. In the "Before running startup page" select the option "No Build"
    4. In the "Build Solution action" uncheck the option "Build Web Site as part of solution"

After deploying this to the web server (copy the folder and its contents) This to results in an error, indicating that there are duplicate code files:
Compiler Error Message: CS0433: The type 'Helper' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webappname\dbb281d9\f91cd8bd\assembly\dl3\fcb3412e\7d20a5ef_0cc0c801\App_Code.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webappname\dbb281d9\f91cd8bd\App_Code.d1dlmug8.dll'

6. I deleted App_Code folder from the deployed location.  The application works as expected.
Note: when I deployed the Compiled version of the web application, I deleted two items: the App_code folder and the  PrecompiledApp.config.  Once I did this the app performed as expected.

That's a long way to get to my queston.  What is the best practice for building and deploying web applications that present these kinds of issues?  Is there a Step-by-step anywhere?

Thanks in advance for any assistance.
Paul





Here's the EE Thread I'm reading: http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_21942835.html
0
Comment
Question by:RoadhouseBlues
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 21793659
Don't copy the folder. Use "publish website". That will correctly upload only the directories that need to be uploaded.
0
 

Author Comment

by:RoadhouseBlues
ID: 21795551
Vadimrapp1,

Thanks.  My fault, I should have mentioned that these are on different networks.  I've no way to use publish website to get the web application deployed to the test site.

Alternative?

Thanks,
Paul
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 21795741
add setup and deployment project to the solution; add output from the main project; build setup, then run it at the target site.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 21802314
another way: publish website to your local server (or any server you can publish to), then copy from there.
0
 

Author Comment

by:RoadhouseBlues
ID: 21814944
Thanks again,

I'll try that. If you know of any step-by-step "how to's" please pass that on.

0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 250 total points
ID: 21815034
0
 

Author Closing Comment

by:RoadhouseBlues
ID: 31467583
This is what I was looking for.  I should have checked Scott's site first!
Thanks again
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# GridRow get Old/New Value 1 55
Name space syntax error 12 41
Word Directory is not in the drop down list 4 25
VB.NET 2008 Populate DataModel with DataTable 24 5
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now