G
Guest
Hi,
I have set up a new web site application in VS 2005, and have created a
couple of pages which seem to run ok.
I then manually added a file called Global.asax.vb, within a folder that I
also manually created 'App_Code' with the start code as below:
Imports System.Security
Imports System.Security.Principal
Imports System.Web.Security
Imports System.Threading
Imports System.Globalization
Imports System.Configuration
Namespace ASPNET.Test
Public Class [Global]
Inherits System.Web.HttpApplication
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As
EventArgs)
Try
........
However when I try and debug the application the code on the pages seem to
run ok, but the code within my 'Sub Application_BeginRequest' does not seem
to run.
Have I gone about setting up this file in the wrong way, or is there a
setting I need to change to ensure the whole thing runs as an application and
not as individual pages?
Interestingly when I open up VS 2005 before opening an application /
project, there are several recent projects, some of which have a VS Logo to
the left of them, whilst the project in question doesn't it only has a logo
that looks like a folder - Does this mean that it is not configured proerly
as an application, and therefore doesn't even look for a Global.asax file?
Thanks, Mike.
I have set up a new web site application in VS 2005, and have created a
couple of pages which seem to run ok.
I then manually added a file called Global.asax.vb, within a folder that I
also manually created 'App_Code' with the start code as below:
Imports System.Security
Imports System.Security.Principal
Imports System.Web.Security
Imports System.Threading
Imports System.Globalization
Imports System.Configuration
Namespace ASPNET.Test
Public Class [Global]
Inherits System.Web.HttpApplication
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As
EventArgs)
Try
........
However when I try and debug the application the code on the pages seem to
run ok, but the code within my 'Sub Application_BeginRequest' does not seem
to run.
Have I gone about setting up this file in the wrong way, or is there a
setting I need to change to ensure the whole thing runs as an application and
not as individual pages?
Interestingly when I open up VS 2005 before opening an application /
project, there are several recent projects, some of which have a VS Logo to
the left of them, whilst the project in question doesn't it only has a logo
that looks like a folder - Does this mean that it is not configured proerly
as an application, and therefore doesn't even look for a Global.asax file?
Thanks, Mike.