Re: FormsAuthentication

From: Chris Roden (croden_at_sterlingcapital.com)
Date: 05/28/03


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
>> > >
>> > >
>> >
>> >
>>
>>
>
>
>.
>



Relevant Pages

  • How to get Focus on one Button,if two buttons exists on the same form
    ... The Login page of my Web Project consists of two Buttons. ... If user enters his username and password and clicks on enter button ... So,please specify how to get focus on the specified ...
    (microsoft.public.dotnet.framework.aspnet)
  • sun ray server 2.0
    ... I have sun Rays and they do not display the login screen. ... # To specify the system env vars to be exported to the users session ... # The following entries are dynamically created by Sun Ray. ...
    (comp.sys.sun.admin)
  • Problem handling Login control Authenticate event
    ... login process. ... required for login… they have a username, password, and another “location ... and when the extra input field is submitted ... for the users where this concatenation of the two input field ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: unable to login as user
    ... unable to login as user ... Log in as root and look closely at the user account. ... the system just seems to hang and then go back to the username ...
    (RedHat)
  • Re: Unable to log into OWA despite using correct username and pass
    ... the OWA interface despite using the correct username and password. ... OWA login page is displayed correctly but when trying to login users get ... "You could not be logged on to Outlook Web Access. ... The issue is affecting all accounts including the 'Administrator' ...
    (microsoft.public.exchange.clients)