Session Variables in .NET

Discussion in 'Microsoft ASP .NET' started by Carl, Aug 4, 2003.

  1. Carl

    Carl Guest

    Hi,

    I am starting to develop an ASP.Net application.

    I will have a logon page which will take a UserName and
    Password. A Stored Procedure will verify that the logon
    is correct.

    I was going to use a Session Variable to indicate whether
    the user is logged on or not. Based on this variable I
    would show certain links, allow access to certain pages.

    Is this a good idea or is there a better way?

    Thanks.
    Carl.
     
    Carl, Aug 4, 2003
    #1
    1. Advertisements

  2. ASP.NET has this functionality built in. It's called Forms Authentication.
    It is easily configured in your web.config file.
    Here's more information:
    http://www.dotnetbips.com/displayarticle.aspx?id=9

    You may want to combine this with your session technique you mentioned to
    determine which links to make visible on your page.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net


    "Carl" <> wrote in message
    news:85f501c35ad8$5d56ef00$...
    > Hi,
    >
    > I am starting to develop an ASP.Net application.
    >
    > I will have a logon page which will take a UserName and
    > Password. A Stored Procedure will verify that the logon
    > is correct.
    >
    > I was going to use a Session Variable to indicate whether
    > the user is logged on or not. Based on this variable I
    > would show certain links, allow access to certain pages.
    >
    > Is this a good idea or is there a better way?
    >
    > Thanks.
    > Carl.
     
    Steve C. Orr, MCSD, Aug 4, 2003
    #2
    1. Advertisements

  3. Carl

    Adrian Banks Guest

    Have a look at
    http://www.zdnet.com.au/builder/program/windows/story/0,2000035027,20274191,
    00.htm

    It explains how to use Forms authentication with a database, allowing you to
    have an automated signup to enter user's details into a database.

    Adrian

    "Carl" <> wrote in message
    news:867f01c35ae0$d23d9050$...
    > Thanks for that Steve.
    >
    > The thing is that these are people coming over the
    > Internet and are total strangers to the company.
    >
    > C
    > >-----Original Message-----
    > >ASP.NET has this functionality built in. It's called

    > Forms Authentication.
    > >It is easily configured in your web.config file.
    > >Here's more information:
    > >http://www.dotnetbips.com/displayarticle.aspx?id=9
    > >
    > >You may want to combine this with your session technique

    > you mentioned to
    > >determine which links to make visible on your page.
    > >
    > >--
    > >I hope this helps,
    > >Steve C. Orr, MCSD
    > >http://Steve.Orr.net
    > >
    > >
    > >"Carl" <> wrote in message
    > >news:85f501c35ad8$5d56ef00$...
    > >> Hi,
    > >>
    > >> I am starting to develop an ASP.Net application.
    > >>
    > >> I will have a logon page which will take a UserName and
    > >> Password. A Stored Procedure will verify that the logon
    > >> is correct.
    > >>
    > >> I was going to use a Session Variable to indicate

    > whether
    > >> the user is logged on or not. Based on this variable I
    > >> would show certain links, allow access to certain

    > pages.
    > >>
    > >> Is this a good idea or is there a better way?
    > >>
    > >> Thanks.
    > >> Carl.

    > >
    > >
    > >.
    > >
     
    Adrian Banks, Aug 5, 2003
    #3
    1. Advertisements

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

    Global Session Variables and Session State

    Earl Teigrob, Dec 16, 2003, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    240
    Alvin Bruney
    Dec 17, 2003
  2. Jeff Smythe
    Replies:
    3
    Views:
    808
    Jeff Smythe
    Jan 2, 2004
  3. =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?=

    Session Variables assigned to the wrong session?

    =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?=, Jan 20, 2005, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    240
    Alvin Bruney [MVP]
    Jan 20, 2005
  4. Robert Faulkner

    RE: Session Variables assigned to the wrong session?

    Robert Faulkner, Jan 28, 2005, in forum: Microsoft ASP .NET
    Replies:
    0
    Views:
    324
    Robert Faulkner
    Jan 28, 2005
  5. Session Variables and Static Variables

    , Mar 23, 2006, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    244
Loading...

Share This Page