Re: Http Module -Multiple Projects
- From: Vadivel Kumar <vadivelk@xxxxxxxxxxxx>
- Date: Wed, 12 Jul 2006 16:06:30 +0530
Preferably, you can make use of HttpModule and check the requested url for the username whether it is authenticated or not. This is one way of solving your problem.
But, I would suggest you to have a different approach which might well fit in your case.
1. Have a class called "BasePage" which is inherited from System.Web.UI.Page class.
2. Normally, all your WebForm classes would inherit the ASP.NET Page class. You have to change that to "BasePage" class.
3. Now, implement your authentication logic inside the BasePage class by overriding the Page_Load event.
If you implement the authentication code in HttpModule then you would end up in checking for all the page requests even if you dont need to authenticate a page. In this approach you have inherit the BasePage class for the webform's that are needed to be authenticated.
Let me know if you have any issues in understanding this solution.
--
Vadivel Kumar
http://www.vadivelk.net
vadi@online#2.vadivelk.net (remove "online#2.")
thomson wrote:
Hi All,.
i do hae a solution in which i do have mulitple projects
including Web Projects,, Depending on the functionality it gets
redirected to different web projects and it is working fine,
for eg: http:DomainName/MainProject/index.aspx, If i login, it gets
redirectes to a different Web Project inside the solution like
http://DomainName/MainProject/ChildProject/MyPage.aspx..
This works perfectly fine.
My issue is
:
I need to add redirect a set of request to a different page based on
some criteria, for eg; i do have certain calls like
http://DomainName/username, when a request come like this i need to
authenticate the username with the database and redirect to a
dynamically constructed page which can be a different Web Project
inside the same solution.
Can anyone please guide me how do i solve this issue, should i use a
HTTP Module for this: since it has multipl;e projects i guess some
thing wrong
- Follow-Ups:
- Re: Http Module -Multiple Projects
- From: thomson
- Re: Http Module -Multiple Projects
- References:
- Http Module -Multiple Projects
- From: thomson
- Http Module -Multiple Projects
- Prev by Date: Re: Dynamically setting a MasterPage's <body> tag style
- Next by Date: Urgent
- Previous by thread: Http Module -Multiple Projects
- Next by thread: Re: Http Module -Multiple Projects
- Index(es):
Relevant Pages
|