ASP.NET IIS7.5 Parser Error

I have a production system and test system, both running IIS. IN the production system, everything runs fine. In the test system, I have a directed copy of the folder the site code is contained in which is set up as a virtual directory. The App_Code folder is in the root and contains all the .cs files. When running the same site in test, I get a

Server Error in '/' Application.
--------------------------------------------------------------------------------

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: Could not load type 'SPTasks.master'.

Source Error: 


Line 1:  <%@ Master Language="C#" inherits="SPTasks.master"%>
Line 2:  <html> 
Line 3:  <head runat="server">


Source File: /SPTasks/master.master    Line: 1

Any idea why this would be coming in test and not in production? Is the code not compiling for some reason?

Thanks!

Answers


Some of the comments have asked about MVC, but this looks like a WebForms application - correct me if I'm wrong? In the past I've seen this error if the application has not yet been compiled. You mention that you're copying files across one at a time. Have you actually compiled the application? If there's no dll in the bin folder containing the compiled code for your SPTasks.master.cs class, you'll get this error. As you're not using VS to compile your application, you'll need to use csc directly from the command line as per this MSDN article.

If you have a dll in there, it might be worth looking inside with a decompiler (either Reflector or Jetbrains DotPeek, which is free) to verify that the SPTasks.master.cs class is there.

Another thing to check is that the application pool that the site is running under is configured as .Net Framework Version 2.0 and not 4.0


Need Your Help

Referencing shell32 again, C# Visual Studio

c# visual-studio-2008 reference shell32

Hmmm. Okay after revisiting PInvoke, I'm sure that I don't quite get it :-/ (just asked this question)

Objective-C For-In Loop Get Index

iphone objective-c ios

Consider the following statement:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.