Rob Eberhardt

cleverness ensues

skip navigation

 Wednesday, December 21, 2005

I recently deployed the ASP.net 2.0 Framework to my server, and since have been fighting with problems it's caused. For instance, when I switched one app to use it, it broke all the other v1.1 web apps I was running (including this blog). Fortunately for me, someone else has been having the same problem and found a solution: move the 2.0 apps into their own application pool. Hooray I don't have to uninstall (which I was close to doing).

Hey Microsoft, how about mentioning this anywhere? ...say during the install, on the IIS site's ASP.net tab, or in the error?

I have another related woe, though: If I set a 1.1 app to run under the 2.0 Framework (which should work, and imparts better performance and security), I get the ASP.net Yellow Screen of Death:

Apparently "global" now a reserved keyword under 2.0 (despite its 1.1 compatibility). Fortunately, I found my own easy fix: just rename the class. So line 11 in my global.asax.vb is now Public Class Global2. Of course I made the same change in its global.asax too: <%@ Application src="Global.asax.vb" Inherits="Global2" %>

Happy to find a solution, and I hope mine helps someone.

12/21/2005 12:23 PM Eastern Standard Time  #    Disclaimer  |  Comments [2]  | 
8/23/2006 11:20:06 PM (Eastern Daylight Time, UTC-04:00)
Unfortunately &quot;Global&quot; is now a reserved word in <a title="" href="" ><acronym title="Visual Basic">VB</acronym></a>, which is why the compile error occurs.
<br>
<br>One other way to fix this is to append [ ] characters around the class name. For example:
<br>
<br>Public Class Global
<br>
<br>becomes
<br>
<br>Public Class [Global]
<br>
<br>You can likewise do this for any reference to the class. For example:
<br>
<br>Global.CallSomeMethod()
<br>
<br>becomes
<br>
<br>[Global].CallSomeMethod()
<br>
<br>Hope this helps,
<br>
<br>Scott
8/23/2006 11:20:06 PM (Eastern Daylight Time, UTC-04:00)
Brackets, of course. I hadn't thought of that outside of SQL. Thanks, Scott!
<br>
<br>What I wonder is why this would break when it's still a 1.1 app, just running under the new framework.
<br>
<br>And why make that breaking change in 2.0 at all, esp. when <a title="" href="" ><acronym title="Active Server Pages">ASP</acronym></a>.net apps all have this &quot;global&quot; file and class?
<br>
<br>I miss the days of Classic <a title="" href="" ><acronym title="Active Server Pages">ASP</acronym></a> 1, 2, and 3, when Microsoft still valued backwards compatibility. Are those days gone forever??
<br>
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):