Forms Authentication Using SQL Server 2000 Database

Discussion in 'ASP .Net Security' started by WhiskeyRomeo, Sep 11, 2007.

  1. WhiskeyRomeo

    WhiskeyRomeo Guest

    I have looked at this example and it uses the webconfig file as the external
    datasource. So that was totally unhelpful.

    http://www.aspnettutorials.com/tutorials/validation/authentication-aspnet2-vb.aspx

    I have a 1.1 Login form that implements forms authentication that obviously
    will not convert to VS 2005. It uses a sqlcommand to verify the username and
    password and if validated retrieves certain information about the user via a
    datareader.

    Does anyone have a real world example using SQLServer 2000 or 2005?

    WR
     
    WhiskeyRomeo, Sep 11, 2007
    #1
    1. Advertising

  2. WhiskeyRomeo

    WhiskeyRomeo Guest

    "WhiskeyRomeo" wrote:

    > I have looked at this example and it uses the webconfig file as the external
    > datasource. So that was totally unhelpful.
    >
    > http://www.aspnettutorials.com/tutorials/validation/authentication-aspnet2-vb.aspx
    >
    > I have a 1.1 Login form that implements forms authentication that obviously
    > will not convert to VS 2005. It uses a sqlcommand to verify the username and
    > password and if validated retrieves certain information about the user via a
    > datareader.
    >
    > Does anyone have a real world example using SQLServer 2000 or 2005?
    >
    > WR


    I wanted to add I uses roles and here is my webconfig file settings for the
    1.1 application:

    <authentication mode="Forms">
    <!-- old setting was Windows -->
    <forms name="UPAuth" loginUrl="login.aspx" slidingExpiration="true"
    protection="All" timeout="20" path="/">
    <credentials passwordFormat="Clear">
    </credentials>
    </forms>
    </authentication>
    <location path="Admin">
    <system.web>
    <authorization>
    <!-- Order and case are important below -->
    <allow roles="Admin" />
    <deny roles="Photog,Super,Public" />
    <deny users="?" />
    </authorization>
    </system.web>
    </location>
    <location path="Super">
    <system.web>
    <authorization>
    <!-- Order and case are important below -->
    <allow roles="Super,Admin" />
    <deny roles="Photog,Public" />
    <deny users="?" />
    </authorization>
    </system.web>
    </location>
    <location path="Reports">
    <system.web>
    <authorization>
    <!-- Order and case are important below -->
    <allow roles="Super,Admin,Photog" />
    <deny roles="Public" />
    <deny users="?" />
    </authorization>
    </system.web>
    </location>
    <location path="Public">
    <system.web>
    <authorization>
    <!-- Order and case are important below -->
    <allow roles="Super,Admin,Public" />
    <deny roles="Photog" />
    <deny users="?" />
    </authorization>
    </system.web>
    </location>
     
    WhiskeyRomeo, Sep 11, 2007
    #2
    1. Advertising

  3. WhiskeyRomeo

    WhiskeyRomeo Guest

    Please ignore this post! See later post regarding roles being ignored.

    WR

    "WhiskeyRomeo" wrote:

    > "WhiskeyRomeo" wrote:
    >
    > > I have looked at this example and it uses the webconfig file as the external
    > > datasource. So that was totally unhelpful.
    > >
    > > http://www.aspnettutorials.com/tutorials/validation/authentication-aspnet2-vb.aspx
    > >
    > > I have a 1.1 Login form that implements forms authentication that obviously
    > > will not convert to VS 2005. It uses a sqlcommand to verify the username and
    > > password and if validated retrieves certain information about the user via a
    > > datareader.
    > >
    > > Does anyone have a real world example using SQLServer 2000 or 2005?
    > >
    > > WR

    >
    > I wanted to add I uses roles and here is my webconfig file settings for the
    > 1.1 application:
    >
    > <authentication mode="Forms">
    > <!-- old setting was Windows -->
    > <forms name="UPAuth" loginUrl="login.aspx" slidingExpiration="true"
    > protection="All" timeout="20" path="/">
    > <credentials passwordFormat="Clear">
    > </credentials>
    > </forms>
    > </authentication>
    > <location path="Admin">
    > <system.web>
    > <authorization>
    > <!-- Order and case are important below -->
    > <allow roles="Admin" />
    > <deny roles="Photog,Super,Public" />
    > <deny users="?" />
    > </authorization>
    > </system.web>
    > </location>
    > <location path="Super">
    > <system.web>
    > <authorization>
    > <!-- Order and case are important below -->
    > <allow roles="Super,Admin" />
    > <deny roles="Photog,Public" />
    > <deny users="?" />
    > </authorization>
    > </system.web>
    > </location>
    > <location path="Reports">
    > <system.web>
    > <authorization>
    > <!-- Order and case are important below -->
    > <allow roles="Super,Admin,Photog" />
    > <deny roles="Public" />
    > <deny users="?" />
    > </authorization>
    > </system.web>
    > </location>
    > <location path="Public">
    > <system.web>
    > <authorization>
    > <!-- Order and case are important below -->
    > <allow roles="Super,Admin,Public" />
    > <deny roles="Photog" />
    > <deny users="?" />
    > </authorization>
    > </system.web>
    > </location>
    >
    >
    >
     
    WhiskeyRomeo, Sep 11, 2007
    #3
    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. =?Utf-8?B?Z2F1cmF2?=

    Uploading Data From MS Acess 2000 ti SQL server 2000

    =?Utf-8?B?Z2F1cmF2?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    847
    Mary Chipman [MSFT]
    Jan 9, 2006
  2. Daves
    Replies:
    1
    Views:
    407
  3. C Did
    Replies:
    3
    Views:
    4,033
    Chris Lithgow
    Jun 20, 2006
  4. Replies:
    1
    Views:
    535
    Swanagon, John M \(John\)
    Jul 24, 2006
  5. Denis

    Access 2000 or SQL Server 2000

    Denis, Jan 25, 2004, in forum: ASP General
    Replies:
    1
    Views:
    237
    Nicole Calinoiu
    Jan 25, 2004
Loading...

Share This Page