0

I have a webapplication that uses a master page. When I publish the site in vs2010 (running framework 4), and then I navigate to the default.aspx page I get a parser error that the masterpage's codebehind file does not exist.

I know that a website can be precompiled and then deployed which means there would never be anything that IIS needs to parse. The above error therefore implies that IIS is still trying to compile my precompiled site.

Is there something that needs to be configured to stop the web application from doing this?

3 Answers3

1

Convert to Web Application: Difference between 'Web Site' and 'Project' in Visual Studio

Community
  • 1
  • 1
Migol
  • 8,161
  • 8
  • 47
  • 69
  • I figured out the problem! I use an interface design application (http://www.artisteer.com/) and it creates the files in the web site format. So when I copied the files to the web application project the files remained in their web site configuration. Using the convert to web application option "upgraded" them. –  Mar 17 '11 at 13:34
0

Have you uploaded the bin folder with the webapplication's dll?

Oleg Grishko
  • 4,132
  • 2
  • 38
  • 52
0

You are using the term 'web application' and 'website' interchangeably in your question.

If you are using the web application model, you need to build it before deployment (i.e to a single binary)

If you are using the website model, you need to deploy all your files (code behind included), the framework then JIT compiles all your codebehind.

But you can pre-compile:

http://msdn.microsoft.com/en-us/library/ms227972.aspx

Matt Evans
  • 7,113
  • 7
  • 32
  • 64
  • Yes, I relized that I was confusing people. It is a web application project. Also I let VS2010 do the compiling. Should I compile it manually at the command line instead? –  Mar 17 '11 at 13:24
  • No - as a web application, VS will build it fine. – Matt Evans Mar 18 '11 at 05:53