Ask a Question related to ASP.NET Security, Design and Development.
-
Joe Reazor #1
Global.asax Inheritance?
I understand how Web.Config inheritance works between a parent application
and sub applications under the parent. But what I was wondering was if
there was a similar way to do the same thing for the Global.asax class?
Reason being, I am setting up user authentication and authorization. I have
coded up my Application_AuthenticateRequest method in the Global.asax file
to create an identity and principal which are attached to the Context User.
I have done this at my root web level. Under the root web, I then have
other sub applications in sub folders that are also protected by the same
authentication and authorization. I was hoping that I would not have to add
and maintain the same code in the global.asax files for each of these sub
apps in order to have access to the principal and identity objects set at
the parent level. Any thoughts?
TIA.
==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom
Joe Reazor Guest
-
Session_Start in Global.asax
Is the Session_Start() sub executed on every request or just when a new users session is started? Thx for the help, stan -
global.asax
Hi all! I've created a simple aspx application and when I run it locally on my pc all works fine. If I move it on the web server I get the... -
global.asax problem
Hi all! I've created a simple aspx application and when I run it locally on my pc all works fine. If I move it on the web server I get the... -
Global Error handling in Applicatio_Error() of Global.asax
Hi all, For a web application if we are using web farm, and if i want to do Global Error handling can i use Applicatio_Error() method in... -
What is Global.asax?
It's the class file definition code for the Session and Application events - if you have anything that should be done when a user first connects or... -
John Saunders #2
Re: Global.asax Inheritance?
Global.asax generates a class called "global". I believe you can create a
base class called "GlobalBase" and inherit all of your global.asax's from
that.
--
John Saunders
[email]johnwsaundersiii@hotmail.com[/email]
"Joe Reazor" <joenospam@belgor.com> wrote in message
news:utfsai0PEHA.808@tk2msftngp13.phx.gbl...have> I understand how Web.Config inheritance works between a parent application
> and sub applications under the parent. But what I was wondering was if
> there was a similar way to do the same thing for the Global.asax class?
>
> Reason being, I am setting up user authentication and authorization. IUser.> coded up my Application_AuthenticateRequest method in the Global.asax file
> to create an identity and principal which are attached to the Contextadd> I have done this at my root web level. Under the root web, I then have
> other sub applications in sub folders that are also protected by the same
> authentication and authorization. I was hoping that I would not have to> and maintain the same code in the global.asax files for each of these sub
> apps in order to have access to the principal and identity objects set at
> the parent level. Any thoughts?
>
>
> TIA.
> ==============
> Joe Reazor
> Gorbel Inc.
> email: joereaATgorbelDOTcom
>
>
John Saunders Guest
-
Joe Reazor #3
Re: Global.asax Inheritance?
Yeah that makes sense. Should have thought of that. The only downside I
see with that is the fact that then anytime I want to create a new
application that will be under the same root web, I'll need to remember to
change that inheritance. And even worse anyone else in my group will have
to remember. Doesn't seem very reliable/enforceable in that sense.
==============
Joe Reazor
Gorbel Inc.
email: joereaATgorbelDOTcom
"Eric Marvets" <anonymous@discussions.microsoft.com> wrote in message
news:89DC2E79-F550-4D62-9E0A-D2FEF0CD9698@microsoft.com...System.Web.HttpApplication and implements that functionality? Then you> Have you tried creating a class that inherits from
could have you root and sub apps' Global.asax inherit from your custom class
instead of HttpApplication.>
> -Eric
Joe Reazor Guest
-
Eric Marvets #4
Re: Global.asax Inheritance?
This is a long shot, but you could look at Enterprise Templates. I don't
know enough about them to tell you if you could force all ASP.NET projects
to use the custom class. I think you should be able to default it at least.
Besides, what ever you miss is always caught during testing <g>
--
Eric Marvets
Principal Consultant
the bang project
<shameless self promotion>
Email [email]sales@bangproject.com[/email] for Information on Our Architecture and
Mentoring Services
</shameless self promotion>
"Joe Reazor" <joenospam@belgor.com> wrote in message
news:#HhENZ3PEHA.1348@TK2MSFTNGP12.phx.gbl...class> Yeah that makes sense. Should have thought of that. The only downside I
> see with that is the fact that then anytime I want to create a new
> application that will be under the same root web, I'll need to remember to
> change that inheritance. And even worse anyone else in my group will have
> to remember. Doesn't seem very reliable/enforceable in that sense.
>
>
> ==============
> Joe Reazor
> Gorbel Inc.
> email: joereaATgorbelDOTcom
>
> "Eric Marvets" <anonymous@discussions.microsoft.com> wrote in message
> news:89DC2E79-F550-4D62-9E0A-D2FEF0CD9698@microsoft.com...> System.Web.HttpApplication and implements that functionality? Then you> > Have you tried creating a class that inherits from
> could have you root and sub apps' Global.asax inherit from your custom> instead of HttpApplication.>> >
> > -Eric
>
Eric Marvets Guest
-
Steven Cheng[MSFT] #5
Re: Global.asax Inheritance?
Hi Jeo,
I've also found another thread in Newsgroups:
microsoft.public.dotnet.framework.aspnet.
on the same issue and I've also posted a reply in that one. I'd appreciate
if you also have a look there. Also, if you have any other ideas or
question, please feel free to post here or in that one. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
[url]http://msdn.microsoft.com/asp.net/whidbey/default.aspx[/url]
Steven Cheng[MSFT] Guest



Reply With Quote

