eramgarden Posted September 27, 2006 Posted September 27, 2006 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? Quote
eramgarden Posted September 27, 2006 Author Posted September 27, 2006 Oh, i do get intellisense but I cant do "imports".. why? Quote
Gill Bates Posted September 27, 2006 Posted September 27, 2006 Just add a global.asax.cs file yourself and then modify the global.asax file so that it just has this: <%@ Application src="Global.asax.cs" Inherits="MyNamespace.Global" %> Quote
eramgarden Posted September 27, 2006 Author Posted September 27, 2006 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: Quote
eramgarden Posted September 27, 2006 Author Posted September 27, 2006 Found this: http://rossnelson.blogspot.com/2005/11/fixing-globalasax-in-aspnet-20.html But I had to rename "Global" to something else like "Global2" in the class and in the refernce for it to work...why?? Quote
eramgarden Posted September 27, 2006 Author Posted September 27, 2006 Global, seems like it, is a keyword in vb.net. Quote
Gill Bates Posted September 28, 2006 Posted September 28, 2006 Just add the global.asax and the global.asax.cs files from an existing .NET 1.1 project and it will work. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.