global.asax in 2.0

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
in 1.1, Global.asax has a code behind : globalasax.vb where I could have "imports" and it had Intellisense..

Using 2.0 and I dont see a ".vb" file. I had to type in code below with no Intellisense:

Sub WindowsAuthentication_OnAuthenticate(ByVal Source As Object, _
ByVal e As WindowsAuthenticationEventArgs)
Dim userIdentity As String
userIdentity = e.Identity.Name()
End Sub


Am I missing something?
 
Just add a global.asax.cs file yourself and then modify the global.asax file so that it just has this:

C#:
<%@ Application src="Global.asax.cs" Inherits="MyNamespace.Global" %>
 
No, that didnt work...Should global.asax in 2.0 be in "App_Code"? Is "Global" as keyword in 2.0?

I get :
Keyword is not valid as an identifier.

Line 9:

Line 10:

Line 11: Public Class Global

Line 12: Inherits System.Web.HttpApplication

Line 13:
 
Back
Top