Form based authentication question

Discussion in 'ASP .Net Security' started by M2Web, Jul 9, 2003.

  1. M2Web

    M2Web Guest

    I understand that in the web.config file I can have the following:
    <location path="MembersOnly">
    <system.web>
    <authorization>
    <allow users="myaccount" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>
    My question is, how is the user name myaccount checked against the
    web.config file? Is it done with the
    FormsAuthentication.RedirectFromLoginPage Method? For example,
    FormsAuthentication.RedirectFromLoginPage("myaccount", false)

    Thanks
     
    M2Web, Jul 9, 2003
    #1
    1. Advertising

  2. M2Web

    Colin Turner Guest

    Have done mine through a custom component talking to SQL Server database
    table containing usernames and encrypted passwords.

    If you're using the config file, I think you use the
    FormAuthentication.Authenticate method. The RedirectFromLoginPage method
    writes out the forms authentication cookie containing your username and
    redirects you to the page you originally wanted to navigate to.

    Regards
    Colin

    "M2Web" <> wrote in message
    news:...
    > I understand that in the web.config file I can have the following:
    > <location path="MembersOnly">
    > <system.web>
    > <authorization>
    > <allow users="myaccount" />
    > <deny users="*" />
    > </authorization>
    > </system.web>
    > </location>
    > My question is, how is the user name myaccount checked against the
    > web.config file? Is it done with the
    > FormsAuthentication.RedirectFromLoginPage Method? For example,
    > FormsAuthentication.RedirectFromLoginPage("myaccount", false)
    >
    > Thanks
     
    Colin Turner, Jul 9, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dom
    Replies:
    0
    Views:
    468
  2. Dom
    Replies:
    0
    Views:
    510
  3. Max
    Replies:
    2
    Views:
    1,109
  4. Oliver Kharraz

    Beginners question: Form based authentication

    Oliver Kharraz, May 23, 2004, in forum: ASP .Net Security
    Replies:
    2
    Views:
    114
    Oliver Kharraz
    May 23, 2004
  5. kitchai yong via .NET 247

    authenticate win32 form client with form based authentication web services

    kitchai yong via .NET 247, May 13, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    228
    Jan Tielens
    May 13, 2004
Loading...

Share This Page