Forms Authentication adding new users programatically

Discussion in 'ASP .Net Security' started by Scott Roberts, Jun 2, 2004.

  1. How do you add new users programatically using Forms Authentication in
    ASP.Net? There must be a way to do this besides editing the
    web.config file by hand or attempting to modify the web.config file
    using an XmlDataDocument.

    This is a requirement I have to meet for a project Admin users must be
    able to add new users. And since I'm using Forms Authentication to
    bind the current user with roles stored in SQL server I'd hate to
    abandon it.
     
    Scott Roberts, Jun 2, 2004
    #1
    1. Advertising

  2. Scott Roberts

    Raterus Guest

    You are going to need to put your users somewhere else, like SQL Server
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT03.asp

    You could edit Web.Config theoretically, but realize that the second you do that, your Application will restart, and you'll lose all sessions.

    --Michael


    "Scott Roberts" <> wrote in message news:...
    > How do you add new users programatically using Forms Authentication in
    > ASP.Net? There must be a way to do this besides editing the
    > web.config file by hand or attempting to modify the web.config file
    > using an XmlDataDocument.
    >
    > This is a requirement I have to meet for a project Admin users must be
    > able to add new users. And since I'm using Forms Authentication to
    > bind the current user with roles stored in SQL server I'd hate to
    > abandon it.
     
    Raterus, Jun 3, 2004
    #2
    1. Advertising

  3. You should put your users in a extern datasourc such as SQL servern or AD..
    (If you use SQL-server, modell a data base wich connect users to groups..)
    Then in your app. you could authenticate users against groups instead of
    specific accounts..

    This will result in that you dont need to do any changes in your app.(unless
    you architecture of the app, changes) Instead you manipulate the users group
    membership in your choosen datasource..

    "Scott Roberts" <> skrev i meddelandet
    news:...
    > How do you add new users programatically using Forms Authentication in
    > ASP.Net? There must be a way to do this besides editing the
    > web.config file by hand or attempting to modify the web.config file
    > using an XmlDataDocument.
    >
    > This is a requirement I have to meet for a project Admin users must be
    > able to add new users. And since I'm using Forms Authentication to
    > bind the current user with roles stored in SQL server I'd hate to
    > abandon it.
     
    Robert Wallström, Jun 4, 2004
    #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. Travis Parrent
    Replies:
    1
    Views:
    409
    Travis Parrent
    Feb 10, 2004
  2. Eric
    Replies:
    2
    Views:
    1,495
    Tommy
    Feb 13, 2004
  3. Philip Tepedino
    Replies:
    1
    Views:
    425
    bruce barker
    Aug 3, 2004
  4. BJ Lap
    Replies:
    2
    Views:
    573
    BJ Lap
    Nov 20, 2005
  5. Eric
    Replies:
    2
    Views:
    554
Loading...

Share This Page