Sunday, August 30, 2009 #

Deploying a Web Application Project Still looks for Code-behind during Runtime

Technorati Tags:

When you deploy a WAP project, you don’t need to copy up any code-behind pages for .aspx pages or user controls (.ascx). 

However, I was stumped when recently I had an old WAP project that I was working on and needed to deploy some updates.  I published it via the Build | Publish option in VS 2008 and then selected only to publish the minimum required:

publishwap

But I was getting errors during runtime stating that it could not find the code-behind page to default.aspx.

Anyway, the problem was I forgotten that about 4 years ago, I had copied the files from an old website to a WAP project.  But at the time, I didn’t actually convert the .aspx pages to WAP.  That’s why I was still getting that error during runtime even though I had copied them into a brand new WAP project.  So I simply right-clicked the WAP project and did a “Convert to Application”.  Since this was a very small non-complicated web site, I had no issues and this resolved that deployment issue in production.

In a future post, I will talk about how to convert a very large complex website project to WAP, something I had to do recently at work.  I’ve never really used websites and it’s always been WAP in the past 5  years so this was a royal pain in the ass due to the complexity of our huge .com public site.  Hopefully I will provide a very clear path to converting…because some of the articles out there are pretty lame and don’t really tell you all the details you need to know.  So look for that coming soon.


posted @ Sunday, August 30, 2009 1:53 PM | Feedback (1)