Re: Http Module -Multiple Projects

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I clearly understood ur solution i was using Base Page class Mechanism
to handle most of my validation usage, but what happens it still enters
my system, i dont want that i have to intercept t from the beginning
and redirect a different set all together,

I problem i noticed is that each and every time the request has to go
thru the authentication scheme.

Regards

thomson


Vadivel Kumar wrote:

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


.



Relevant Pages

  • Re: Http Module -Multiple Projects
    ... 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. ... including Web Projects,, Depending on the functionality it gets ... I need to add redirect a set of request to a different page based on ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Forms Based Authentication and the OpenWave Browsers
    ... Try taking this redirect out of the try...catch; ... > Authentication in cookie enabled WAP browsers. ... > Samsung Browser, Forms Authentication and RedirectFromLoginPage - This is ... > Open Wave Browser and Cookies - While regression testing my new change, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: redirect http to https for virtual directories
    ... at the URL and if it comes over "80" redirect to ... Enable anonymous access and unchecked the Require SSL ... If proper authentication is provided, ... custom error not handling http to https redirects ...
    (microsoft.public.inetserver.iis)
  • Re: MS05-004: Path vunerability still present in ASP.NET 2.0
    ... -> redirect to login.aspx ... Dominick Baier - DevelopMentor ... indeed exist on this ASP.NET 2.0 web site hosted on a W2003 SP2 IIS ... ASP.NET picks-up the authentication / authorization and re-directs. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Default.aspx - newbie Q`
    ... check and redirect to the ReturnURL or Selected.aspx depending on the case. ... > and replace it with something that takes then straight to the login page. ... >> Curt Christianson ... >>> authentication ...
    (microsoft.public.dotnet.framework.aspnet)