Good idea !
I'll try it out.
THX a lot,
Frédéric
"Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
news:eblZe%23xoEHA.2636@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hi,
>
> I don't think you can do what you are looking for in the Web.config file.
> You can only have 1 login page per app. However there might be a work
> around. In your login page use this:
>
> FormsAuthentication.GetRedirectUrl
>
> That will tell you what page your user is looking to get to. Check this[/color]
in[color=blue]
> the Page_Load event of your login page. By checking out the value of this
> you may be able to determine the type of user based on where they want to
> go. Then if this is a member instead of an admin use a[/color]
Response.Redirect()[color=blue]
> in the Page_Load to go to the members login page. Once there check if[/color]
they[color=blue]
> are authenticated. If they are, manually redirect them yourself to the
> FormsAuthentication.GetRedirectUrl result. I don't know if this will work
> but if it does let us know because then maybe I'll use that way in the
> future too. Good luck! Ken.
>
> "nicholas" <murmurait1@hotmail.com> wrote in message
> news:eWyuYrxoEHA.2068@TK2MSFTNGP09.phx.gbl...[color=green]
> > THX a lot for your reply.
> >
> > Yes, indeed, I also use roles.
> > But I define those roles in a database, so you can add as much users and
> > roles as you want.
> >
> > But I would like to have different login pages.
> > The look and feel of the admin-login-page is not the same as the look[/color][/color]
and[color=blue][color=green]
> > feel of the members-login-page.
> >
> > There should be a way of doing this, but I allready searched around the[/color]
> net[color=green]
> > and didn't found it.
> > Hope someone on this forum has an idea.
> >
> > THX anyway,
> > Frédéric
> >
> > __________________________________________________ __
> > ---------------------------------------------------------------------
> > GIFTLIST
> >
www.giftlist.be
> > Open your gift list in more than 100 shops in Belgium
> > Open Uw Geschenkenlijst in meer dan 100 winkels in België
> > Ouvrez votre liste de cadeau dans plus de 100 boutiques en Belgique
> > ---------------------------------------------------------------------
> >
> >
> > "Ken Dopierala Jr." <kdopierala2@wi.rr.com> wrote in message
> > news:%23NQyNqkoEHA.3564@tk2msftngp13.phx.gbl...[color=darkred]
> > > Hi,
> > >
> > > What I do is I use one login page but then I create <location> tags.[/color]
> > These[color=darkred]
> > > tags specify which users in which roles get to access pages in[/color][/color][/color]
specific[color=blue][color=green][color=darkred]
> > > folders. Be sure to assign roles to your users when they login. For
> > > example:
> > >
> > > <location path="Members/Administrator">
> > > <system.web>
> > > <authorization>
> > > <allow roles="Administrator"></allow>
> > > <deny users="*"/>
> > > </authorization>
> > > </system.web>
> > > </location>
> > >
> > >
> > > <location path="Members/Registered">
> > > <system.web>
> > > <authorization>
> > > <allow roles="Registered"></allow>
> > > <deny users="*"/>
> > > </authorization>
> > > </system.web>
> > > </location>
> > >
> > > <location path="Members/Shared">
> > > <system.web>
> > > <authorization>
> > > <allow roles="Administrator, Registered"></allow>
> > > <deny users="*"/>
> > > </authorization>
> > > </system.web>
> > > </location>
> > >
> > > The top location tag allows only people in the Administrator role to[/color]
> > access[color=darkred]
> > > pages in the /Members/Administrator folder. The second tag allows
> > > Registered users to view their pages. The third allows both[/color]
> > Administrators[color=darkred]
> > > and Registered users to view the Shared folder. I put my <location>[/color][/color]
> tags[color=green][color=darkred]
> > > directly above my <system.web> tag and directly below my[/color][/color][/color]
<configuration>[color=blue][color=green]
> > tag[color=darkred]
> > > in the Web.config file. Doing it this way you only need to have 1[/color][/color][/color]
login[color=blue][color=green]
> > per[color=darkred]
> > > user and then they can go wherever they are allowed to. Good luck![/color][/color]
> Ken.[color=green][color=darkred]
> > >
> > > --
> > > Ken Dopierala Jr.
> > > For great ASP.Net web hosting try:
> > >
http://www.webhost4life.com/default.asp?refid=Spinlight
> > >
> > > "nicholas" <murmurait1@hotmail.com> wrote in message
> > > news:%23859cjkoEHA.3988@tk2msftngp13.phx.gbl...
> > > > Hi,
> > > >
> > > > Got an asp.net application and I use the "forms" authentication mode
> > > defined
> > > > in the web.config file.
> > > >
> > > > Everything works fine.
> > > > But now I would like to add a second, different login page for the[/color][/color]
> users[color=green][color=darkred]
> > > > that go in a specific folder.
> > > > How can I do this?
> > > >
> > > > I tried this:
> > > >
> > > > my root web.config contains:
> > > > -----------------------------
> > > > <authentication mode="Forms">
> > > > <forms name="GLWEB.ASPXAUTH"
> > > > loginUrl="login.aspx"
> > > > protection="All"
> > > > timeout="500"
> > > > path="/"
> > > > />
> > > > </authentication>
> > > >
> > > > <authorization>
> > > > <allow users="*" />
> > > > <deny users="?" />
> > > > </authorization>
> > > > -----------------------------
> > > >
> > > > But for the folder /members I want another login page, so I inserted[/color]
> > this[color=darkred]
> > > in
> > > > the web.config in the folder /members:
> > > > -----------------------------
> > > > <authentication mode="Forms">
> > > > <forms name="GLWEB.ASPXAUTH"
> > > > loginUrl="/members/login.aspx"
> > > > protection="All"
> > > > timeout="500"
> > > > path="/"
> > > > />
> > > > </authentication>
> > > >
> > > > <authorization>
> > > > <allow roles="member" />
> > > > <deny users="*" />
> > > > </authorization>
> > > > -------------------------------
> > > >
> > > > Hope someone can help me.
> > > > THX !
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]