From 1.1 to 2.0: Parser Error – Could not load type 'xyz.Global'

As we were upgrading to run ASP.Net 2.0, we ran into this wonderful problem.  Your code seems to run fine until you push it to a server and you get this 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: Could not load type ‘xyz.Global’.
Source Error:

Line 1:  <%@ Application Inherits="xyz.Global" Language="VB" %>

Source File: /global.asax    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42


There are 2 things I had to remember to do to get this to work.

1) We use a domain user for the worker process, so our site can access UNC files across the network.  In order for this user to have the ability to compile the app, you have to give them full rights to: c:WINDOWSMicrosoft.NETFrameworkv1.1.4322 and if you start running your apps in .net 2.0, you need to do the same for c:WINDOWSMicrosoft.NETFrameworkv2.0.50727.

2) If you have any web apps running in 1.1, there is a good chance that even thought you changed the iis setting to 2.X, you are still running against an app pool that is shared with another site using 1.1.  So, just create a new app pool, and have your newly 2.0 site setup to use that app pool.

Problem solved!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s