How Do I Implement Roles For Forms-Based Authentication?

Discussion in 'ASP .Net' started by Joey, Oct 26, 2005.

  1. Joey

    Joey Guest

    I have a web app with many users and their associated values (hashed
    passwords, first name, last name, etc...) stored in a Microsoft SQL
    Server 2000 database. My app uses stored procedures and forms-bases
    authentication to authenticate users. Currently, in my <location> tags
    in web.config, I have to manually specify user names to control access
    to content. I want to learn how to implement roles to do this. I am
    sure this would be a much better way.

    Does anyone have any suggestions, links, etc... on what to read/study
    to learn how to do this?

    Thanks a bunch.
    Joey, Oct 26, 2005
    #1
    1. Advertising

  2. Joey see this at:- http://aspnet.4guysfromrolla.com/articles/082703-1.aspx
    Hope that helps
    Patrick


    "Joey" <> wrote in message
    news:...
    > I have a web app with many users and their associated values (hashed
    > passwords, first name, last name, etc...) stored in a Microsoft SQL
    > Server 2000 database. My app uses stored procedures and forms-bases
    > authentication to authenticate users. Currently, in my <location> tags
    > in web.config, I have to manually specify user names to control access
    > to content. I want to learn how to implement roles to do this. I am
    > sure this would be a much better way.
    >
    > Does anyone have any suggestions, links, etc... on what to read/study
    > to learn how to do this?
    >
    > Thanks a bunch.
    >
    Patrick.O.Ige, Oct 26, 2005
    #2
    1. Advertising

  3. Joey

    KMA Guest

    Patrick,

    I implemented roles and it worked great for a while. I could query the roles
    using IsInRole and display different page elements. Nice. Then about a month
    ago it stopped working. I have to point out that my host had some kind of
    server problem, the exact narute of which or what they did to fix it is not
    yet known. I'm not sure if it's related or not. But now when I try to output
    a list of roles for the current user I get a blank list on the host, but a
    normal expected output when I host locally with identical files. The roles
    are stored in a client cookie and I have tested that I read them correctly
    on the host. There seems to be some problem either in creating the auth
    ticket or in the IsInRole function. I read soemwhere that the function
    doesn't work reliably if the the asp.net app is mapped to a UNC folder. Can
    you shed any light as to:

    1) if this is really true
    2) how can I detect programatically if my host area is UNC or not
    3) what to do about it.

    Also, I have a function to send myself an email with visitor tracking
    information. This is sent on session end. This has stopped working too,
    although the email functionality still works because I can send myself a
    test email through my "contact us" page.

    I'm puzzled.

    Thanks for your help.


    "Patrick.O.Ige" <> wrote in message
    news:...
    > Joey see this at:- http://aspnet.4guysfromrolla.com/articles/082703-1.aspx
    > Hope that helps
    > Patrick
    >
    >
    > "Joey" <> wrote in message
    > news:...
    > > I have a web app with many users and their associated values (hashed
    > > passwords, first name, last name, etc...) stored in a Microsoft SQL
    > > Server 2000 database. My app uses stored procedures and forms-bases
    > > authentication to authenticate users. Currently, in my <location> tags
    > > in web.config, I have to manually specify user names to control access
    > > to content. I want to learn how to implement roles to do this. I am
    > > sure this would be a much better way.
    > >
    > > Does anyone have any suggestions, links, etc... on what to read/study
    > > to learn how to do this?
    > >
    > > Thanks a bunch.
    > >

    >
    >
    KMA, Oct 26, 2005
    #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. Sharat Koya

    NT based roles using forms authentication

    Sharat Koya, Aug 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,168
    Scott Allen
    Aug 13, 2004
  2. Luis Esteban Valencia Muñoz perrohijueputa@hotmail

    Forms Authentication based on roles.

    Luis Esteban Valencia Muñoz perrohijueputa@hotmail, Aug 9, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    115
    Luis Esteban Valencia Muñoz perrohijueputa@hotmail
    Aug 9, 2004
  3. Keltex
    Replies:
    1
    Views:
    392
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  4. Eric
    Replies:
    2
    Views:
    480
  5. Eric
    Replies:
    0
    Views:
    190
Loading...

Share This Page