|
-
Nov 26th, 2008, 07:48 AM
#1
Thread Starter
Addicted Member
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 
-
Nov 27th, 2008, 10:04 AM
#2
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.
-
Nov 27th, 2008, 10:49 AM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|