Mikey S.
Mikey S.

Reputation: 3331

ASP.Net Web Application Deployment -

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?

Upvotes: 1

Views: 555

Answers (1)

competent_tech
competent_tech

Reputation: 44921

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

Upvotes: 2

Related Questions