469,599 Members | 2,897 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,599 developers. It's quick & easy.

Multiple Logins in Forms Authentication??

Hi!!
I have a site with a backend subdirectory with the backend of the site.
I need that the site to have one login and the backend directory
another one. Is this possible with Forms Authentication??
What can i do??

Thanks

Nicolas

Nov 19 '05 #1
2 2715
Hi Nicolas,

I would look into using Roles with your Forms Authentication. When you
verify your users credentials you also get their roles, if they are in an
Admin role then you can give them access to the backend directory. If they
are only in the Member role then they have no access. You can assign more
than 1 role to a user so you'll never need to do additional checks. In your
web.config file place <location> tags to have ASP.Net manage everything via
Roles for you (the <location> tags go right at the top of the web.config
file as below):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="Members">
<system.web>
<authorization>
<allow roles="Member, Administrator"></allow>
<deny users="*"/>
</authorization>
</system.web>
</location>

<location path="Members/Backend">
<system.web>
<authorization>
<allow roles="Administrator"></allow>
<deny users="*"/>
</authorization>
</system.web>
</location>
..
..
..

Note that if you don't assign multiple roles to your users then you can
allow multiple roles access in the <location> tags. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Nicolas Bottarini" <ni**************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi!!
I have a site with a backend subdirectory with the backend of the site.
I need that the site to have one login and the backend directory
another one. Is this possible with Forms Authentication??
What can i do??

Thanks

Nicolas

Nov 19 '05 #2
Thank you very much for the reply Ken. The problem is that an admin
user can be logged in the frontend. Apart from that, I need 2 logins
with different UI.
How does all the people to make their backends?? They make a different
application??

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Albe V° | last post: by
6 posts views Thread by Andrew Connell | last post: by
10 posts views Thread by Conformix Sales | last post: by
11 posts views Thread by xenophon | last post: by
1 post views Thread by TRO | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.