Connecting Tech Pros Worldwide Forums | Help | Site Map

ASPNET2.0 Membership Multiple login redirections

Steven Nagy
Guest
 
Posts: n/a
#1: Apr 3 '07
Hi All,

I can successfully specify access levels to folders and files with no
problem through web.config.
In my application I have 2 folders off root:
/Admin/
/Members/

When a person tries to go to /Admin/default.aspx they should get
redirected to /Admin/login.aspx
Similarly, when a person tries to go to /Members/default.aspx they
should get redirected to /Members/login.aspx

As it stands, I can only specify one login page for the application,
which is currenly set to /Admin/login.aspx.
So currently if the unlogged in user tries to go to /Members/
default.aspx they end up redirected to /Admin/login.aspx.

Naturally I COULD have just one login page and redirect the user
depending on role. But I'd like to solve the above problem first.

Can this be done in web.config with all the other authentication
settings?

Cheers,
Steven


Alexey Smirnov
Guest
 
Posts: n/a
#2: Apr 3 '07

re: ASPNET2.0 Membership Multiple login redirections


On Apr 3, 6:45 am, "Steven Nagy" <learndot...@hotmail.comwrote:
Quote:
As it stands, I can only specify one login page for the application,
Steven, you can create an application (a virtual directory) for the /
Members
I think this is the only way

Steven Nagy
Guest
 
Posts: n/a
#3: Apr 3 '07

re: ASPNET2.0 Membership Multiple login redirections


Quote:
you can create an application (a virtual directory) for the /
Members
Hi,

That's a nice answer. I hadn't thought of it but it makes sense.
The only problem is that in shared hosting environments you don't
always have control over that stuff.

I suppose I can restructure but I would have thought this something
that would be required by a few people, not just me.
Surely its not that uncommon?

Thanks for your answer,
Steven


Alexey Smirnov
Guest
 
Posts: n/a
#4: Apr 3 '07

re: ASPNET2.0 Membership Multiple login redirections


On Apr 3, 11:45 pm, "Steven Nagy" <learndot...@hotmail.comwrote:
Quote:
Quote:
you can create an application (a virtual directory) for the /
Members
>
Hi,
>
That's a nice answer. I hadn't thought of it but it makes sense.
The only problem is that in shared hosting environments you don't
always have control over that stuff.
>
I suppose I can restructure but I would have thought this something
that would be required by a few people, not just me.
Surely its not that uncommon?
>
Thanks for your answer,
Steven
You can either use a role-based security (the standard way), or two
virtual directories, or you may also implement a custom authentication
against your database.

For custom authentication you would need a datasource and a webform

Here is a very basic example using a flat XML
http://aspalliance.com/505_CodeSnip_...st_an_XML_File

Closed Thread