1

I'm trying to deploy/publish my ASP.NET WebForms application in VS 2010 but i'm having trouble doing so.

On the build settings "Items to deploy" section I choose: "Only files needed to run this application" since I don't want others to access the .cs/designer.cs files and other code data.

Everything works flawlessly it seems, but when trying to load up the default page with my browser I get the following error:

Parser Error

Description: An error occurred during the parsing of a resource required to service            
this request. Please review the following specific parse error details and modify your  
source file appropriately. 

Parser Error Message: The file '/MyWebApp/Default.aspx.cs' does not exist.

When I look in the deployed folder I obviously can't see the .cs file mentioned above, but from my understanding, I shouldn't see it anyways, since all code behind files are compiled into MyWebApp.dll which is located in deployed folder's bin folder.

Last thing worth mentioning is that I've added:

<validation validateIntegratedModeConfiguration="false" />

in my web.config to fix a different error I got earlier.

Not sure that this has to do with the previous error, but I thought it's worth mentioning.

What am I missing?

1 Answer 1

2

It sounds like it is still a web site and not a web application. Please see the following documentation for information on differences between a web site and web application:

Web Application Projects versus Web Site Projects

and this documentation for how to convert your web site to a web application:

Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.