Results 1 to 3 of 3

Thread: Read xml to web.config for authentication

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Read xml to web.config for authentication

    Hi friends,

    For normal authentication, we can use below method in web.config.

    <authentication mode="Forms">
    <forms name="TestAuthCookie" loginUrl="Default.aspx" timeout="30">
    <credentials passwordFormat="Clear">
    <user name="user1" password="pass1"/>
    <user name="user2" password="pass2"/>
    </credentials>
    </forms>

    Two user name and password i can authenticate in front end. I put multiple user name and password in the xml file. How can i get this xml in web.config file and how check authenticate user in the front end.

    Is it possible??

    Please reply soon.

    Hope ur's reply.

    Thanks & Regards
    Failing to plan is Planning to fail

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Read xml to web.config for authentication

    First, that's bad for security, you shouldn't be placing this kind of information in a config or XML file. Why not use a database?

    Second, you can get some nodes in a web.config file to reference external files but I don't believe that the authentication node is one of them. So you'll have to write custom code to read that XML file, probably even a custom membership provider.

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Read xml to web.config for authentication

    Also if you're storing any type of password, please hash it so no one can just open it up and get a user's password.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width