DX( C(pl~hRL((((@ 8 106.htmlhTL((((@ 8 106~1.HTM\hRL 109.html\hTL 109~1.HTM\hRLLĵLĵLĵLĵ 115.html\hTLLĵLĵLĵLĵ 115~1.HTMКhRLPlA 120.htmlКhTLPlA 120~1.HTMzX`PLOOOO0; 13.htmlzXpZLOOOO0; 136F71~1.HTMܚ`PLnuun 16.htmlܚpZLnuun 167F77~1.HTMݚ`PLfzfzfzfz  18.htmlݚpZLfzfzfzfz  187F73~1.HTMZ `PL1ε1ε1ε1ε`MW 20.htmlZ pZL1ε1ε1ε1ε`MW 206183~1.HTMZ`PLܵܵܵܵڣ 28.htmlZpZLܵܵܵܵڣ 287183~1.HTMf`PLTWTWTWTW r 46.htmlfpZLTWTWTWTW r 467587~1.HTMf`PLCCCC`U 52.htmlfpZLCCCC`U 52678F~1.HTMZi`PL$j$j$j$jPwN 60.htmlZipZL$j$j$j$jPwN 606983~1.HTM p`PLUUUUPXH 66.html ppZLUUUUPXH 667987~1.HTMp`PLh&h&h&h&`i\ 72.htmlppZLh&h&h&h&`i\ 726B8F~1.HTMz`PL////`Y 78.htmzpZL////`Y 787B83~1.HTMz`PLҶ4Ҷ4Ҷ4Ҷ4s 84.htmlzpZLҶ4Ҷ4Ҷ4Ҷ4s 847D8B~1.HTMޚ`PL{9{9{9{9= 93.htmlޚpZL{9{9{9{9= 936F811.HTMњhRLx'H:H:H:_vti_cnf -decoration:none; } #blog-header h1 a:hover { border:0; text-decoration:none; } #blog-header p { margin:0; padding:0; font-style:italic; font-size:94%; line-height:1.5em; } div.clearer { clear:left; line-height:0; height:10px; margin-bottom:12px; _margin-top:-4px; /* IE Windows target */ background:url("http://www.blogblog.com/scribe/divider.gif") no-repeat bottom left; } @media all { #main { width:430px; float:right; padding:8px 0; margin:0; } #sidebar { width:150px; float:left; padding:8px 0; margin:0; } } @media handheld { #main { width:100%; float:none; } #sidebar { width:100%; float:none; } } #footer { clear:both; background:url("http://www.blogblog.com/scribe/divider.gif") no-repeat top left; padding-top:10px; _padding-top:6px; /* IE Windows target */ } #footer p { line-height:1.5em; font-family:Verdana, sans-serif; font-size:75%; } /* Typography :: Main entry ----------------------------------------------- */ h2.date-header { font-weight:normal; text-transform:uppercase; letter-spacing:.1em; font-size:90%; margin:0; padding:0; } .post { margin:8px 0 24px 0; line-height:1.5em; } h3.post-title { font-weight:normal; font-size:140%; color:#1B0431; margin:0; padding:0; } .post-body p { margin:0 0 .6em 0; } .post-footer { font-family:Verdana, sans-serif; color:#211104; font-size:74%; border-top:1px solid #BFB186; padding-top:6px; } .post ul { margin:0; padding:0; } .post li { line-height:1.5em; list-style:none; background:url("http://www.blogblog.com/scribe/list_icon.gif") no-repeat 0px .3em; vertical-align:top; padding: 0 0 .6em 17px; margin:0; } /* Typography :: Sidebar ----------------------------------------------- */ h2.sidebar-title { font-weight:normal; font-size:120%; margin:0; padding:0; color:#211104; } h2.sidebar-title img { margin-bottom:-4px; } #sidebar ul { font-family:Verdana, sans-serif; font-size:86%; margin:6px 0 12px 0; padding:0; } #sidebar ul li { list-style: none; padding-bottom:6px; margin:0; } #sidebar p { font-family:Verdana,sans-serif; font-size:86%; margin:0 0 .6em 0; } /* Comments ----------------------------------------------- */ #comments {} #comments h4 { font-weight:normal; font-size:120%; color:#29303B; margin:0; padding:0; } #comments-block { line-height:1.5em; } .comment-poster { background:url("http://www.blogblog.com/scribe/list_icon.gif") no-repeat 2px .35em; margin:.5em 0 0; padding:0 0 0 20px; font-weight:bold; } .comment-body { margin:0; padding:0 0 0 20px; } .comment-body p { font-size:100%; margin:0 0 .2em 0; } .comment-timestamp { font-family:Verdana, sans-serif; color:#29303B; font-size:74%; margin:0 0 10px; padding:0 0 .75em 20px; } .comment-timestamp a:link { color:#473624; text-decoration:underline; } .comment-timestamp a:visited { color:#716E6C; text-decoration:underline; } .comment-timestamp a:hover { color:#956839; text-decoration:underline; } .comment-timestamp a:active { color:#956839; text-decoration:none; } .deleted-comment { font-style:italic; color:gray; } /* Profile ----------------------------------------------- */ #profile-container { margin-top:12px; padding-top:12px; height:auto; background:url("http://www.blogblog.com/scribe/divider.gif") no-repeat top left; } .profile-datablock { margin:0 0 4px 0; } .profile-data { display:inline; margin:0; padding:0 8px 0 0; text-transform:uppercase; letter-spacing:.1em; font-size:90%; color:#211104; } .profile-img {display:inline;} .profile-img img { float:left; margin:0 8px 0 0; border:1px solid #A2907D; padding:2px; } .profile-textblock { font-family:Verdana, sans-serif;font-size:86%;margin:0;padding:0; } .profile-link { margin-top:5px; font-family:Verdana,sans-serif; font-size:86%; } /* Post photos ----------------------------------------------- */ img.post-photo { border:1px solid #A2907D; padding:4px; } /* Feeds ----------------------------------------------- */ #blogfeeds { } #postfeeds { padding:0 0 12px 20px; }

First: Principles

Discussion of agile principles, online communities, rss feeds, and anything else that might appeal to a software developer located in Bloomington, Indiana.

 My Photo
Name: Ben Fulton
Location: Bloomington, Indiana, United States

Monday, September 10, 2007

Could not load type 'Global'

The comments on Harish's blog entry from two years ago give a lot of different solutions to the 'Could not load type "Global" ' problem that you sometimes get in ASP.Net. My solution to the issue was an interesting twist on one of those answers.

I had recently upgraded an application from ASP.Net 1.1 to ASP.NET 2.0, but to keep supporting old versions of the application, I branched it off in Subversion. To make sure the old version still worked, I checked out the old code into a new folder, then I went into IIS and simply moved the location of some virtual directories to point to the old code. It all worked and forgot about it.

Until later, when I came back to make some changes to the new application, started it up and got the message:

Parser Error Message: Could not load type 'WebApplication1.Global'.Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="'WebApplication1.Global'" %>

I couldn't make heads or tails of it, but a web search led me to Harish's post and lots of different answers, several of which I tried, but none of which worked. One suggestion was to make sure the application was set in IIS to use ASP.Net 2.0 rather than 1.1, and even to set it to 1.1, click Apply, set it to 2.0 again and click Apply, just to make sure it took. Another was to make sure the application was compiled. If there's no assembly built for the application, it won't load.
I checked the ASP version, and it was indeed set to 2.0; I said, "Duh!" to compiling, but made sure there was an assembly in the bin directory, and there was; so I was at a dead end.

But I'm sure by