I am kinda new to asp.net. I used asp backing flash for most of the site work i have done, but I have shied away from flash and I am having some issues understanding asp.net membership.
I am currently using the web.config file to set the credentials for forms authentication. I would like to store the member credentials in an xml file, but I can only seem to find examples on the net about how to store the credentials in an sql database. I could create my own authentication system using session variables and xml. But it is mentioned all over the net that this is frowned upon.
So how do i save member information in a separate xml file? and if I do. is there a difference in how I authenticate a user?
I would like to also point out that I am using a webserver that supports only asp.net 2.0
The part i didn't get was calling authenticate. Turns out that's not what creates the cookie. The trick was calling FormsAuthentication.RedirectFromLoginPage. That's what authorizes the user. That's where I were confused.
I have seen it done that custom memebership providers were created, and I had it in my head that this was the only way to do it. But apparently calling FormsAuthentication.RedirectFromLoginPage Does all the magic.
thanks, That 4guysfromrolla's a good read.
Beware when you write to the XML file. Your app is a multi-user system & 2 or more users changing the file at the same time could overwrite each others changes.
That's a good point, but its my personal site and the only authenticated user will be me. I just wanted a non web.config way of storing my username and password.
If I were really serious about it, since my hosting doesn't support mysql, I would use an access database, But I have recently gotten into using XML file to store all my data for my site and I'm very happy with it so far.