Re: FormsAuthentication
From: Chris Roden (croden_at_sterlingcapital.com)
Date: 05/28/03
- Next message: Felix Wu [MSFT]: "RE: Unable to relay with system.web.mail"
- Previous message: Yarx: "Re: FormsAuthentication"
- In reply to: Yarx: "Re: FormsAuthentication"
- Next in thread: Michael Hetrick: "Re: FormsAuthentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 27 May 2003 20:11:10 -0700
I have used your example in one of my web applications. I
have allowed access to the registration page as well as
the homepage. I have a login box on the homepage where
users can log in, but it does not word. If the username
and password are correct the following two lines are
executed:
FormsAuthentication.SetAuthCookie(username.Text, True)
Response.Redirect("/adpagemembers/browse.aspx")
Instead of the user being redirected to the browse.aspx
page they are directed to the login page as described in
the web.config file. How can I log the users in from the
homepage?
Chris Roden
>-----Original Message-----
>You can also specify certain pages that can explicitly
be given different
>access rights than that of other pages. For example.
>
><configuration>
>
> <system.web>
> ~~All the default settings in the web.config
file...~~
> </system.web>
>
>
> <location path="register.aspx">
> <system.web>
> <authorization>
> <allow users="*" />
> </authorization>
> </system.web>
> </location>
></configuration>
>
>This will allow everyone to access the registration page
regardless if they
>have been authenticated or not. Just make sure to notice
that they are NOT
>within the <system.web> tag that is in the web.config
file be default,
>outside of it.
>
>
><ooo> wrote in message news:%
23XjdIY5IDHA.1584@TK2MSFTNGP11.phx.gbl...
>> I tired creating 2 web.config files but does not want
to show the page, is
>> there anything special i need to do when having
multiple web.config files
>>
>> "Matjaz Ladava" <matjaz@_nospam_ladava.com> wrote in
message
>> news:%23UaGhU4IDHA.2240@TK2MSFTNGP11.phx.gbl...
>> > Different folders can have different web.config,
which can have
>different
>> > authorization section. Example would be, that you
place your
>registration
>> > site in different directory, which contains
web.config in which you have
>> > authorization section with allow users = "*" (all
users)
>> > authorization section is order sensitive and built
from top directory
>down
>> > to machine.config, so that entry in your folder will
take precedence and
>> > allow all users to access it.
>> >
>> > Regards
>> >
>> > Matjaz Ladava
>> >
>> > <ooo> wrote in message news:%23
$hUZH4IDHA.2764@tk2msftngp13.phx.gbl...
>> > > Is it possible to have a user redirected to a page
(login.aspx) for
>> > certain
>> > > page access?
>> > >
>> > > i.e. for my registration page I wish them not to
be redirected to the
>> > login
>> > > page, but for every other page they access if they
are not
>authenticated
>> > > then they are redirected?
>> > >
>> > > Cheers
>> > >
>> > > e
>> > >
>> > >
>> >
>> >
>>
>>
>
>
>.
>
- Next message: Felix Wu [MSFT]: "RE: Unable to relay with system.web.mail"
- Previous message: Yarx: "Re: FormsAuthentication"
- In reply to: Yarx: "Re: FormsAuthentication"
- Next in thread: Michael Hetrick: "Re: FormsAuthentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|