I am getting these errors when deploying my web applciation (VS.NET 2.0) to Win2003 SP2, iis6.0.
- The directory "WebAppName/App_WebReferen
ces" 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.aspx4. I receive these errors
The directory "WebAppName/App_WebReferen
ces" 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\a
ssembly\dl
3\fcb3412e
\7d20a5ef_
0cc0c801\A
pp_Code.DL
L' and 'c:\WINDOWS\Microsoft.NET\
Framework\
v2.0.50727
\Temporary
ASP.NET Files\webappname\dbb281d9\
f91cd8bd\A
pp_Code.d1
dlmug8.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.htmlStart Free Trial