Question : Login user using xml as database(C#)

Hi Experts,
I am usign an XML file as database.I am storing Username and password in xml file(I know its a bad idea but I am not having any database option on my web server.).I am storing the user details in xml file at the time of registration,now I want to authenticate user against this xml file.
I am giving Sample xml here.I am getting my hands on xml, so I really appreciate your help how to login user using credential in xml file.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
<customerList>
- <customer>
  <name>Johny</name> 
  <address>Canada</address> 
  <emailID>[email protected]</emailID> 
  <company>IT</company> 
  <country>Canada</country> 
  <contact /> 
  <comment /> 
  <registeredForNews>False</registeredForNews> 
  <product>False</product> 
  <Username>[email protected]</Username> 
  <Pwd>johy567</Pwd> 
  </customer>
- <customer>
  <name>Marshal</name> 
  <address>Canada</address> 
  <emailID>[email protected]</emailID> 
  <company>XYZ</company> 
  <country>Canada</country> 
  <contact /> 
  <comment /> 
  <registeredForNews>False</registeredForNews> 
  <product>GWD Project</product> 
  <Username>[email protected]</Username> 
  <Pwd>marsh544j</Pwd> 
  </customer>
- <customer>
  <name>sagar</name> 
  <address>Mumbai</address> 
  <emailID>[email protected]</emailID> 
  <company>Bitwise</company> 
  <country>India</country> 
  <contact /> 
  <comment /> 
  <registeredForNews>False</registeredForNews> 
  <product>HR mgnt</product> 
  <Username>[email protected]</Username> 
  <Pwd>skosag</Pwd> 
  </customer>
- <pages>
  <aboutUs>0</aboutUs> 
  <captiveServices>0</captiveServices> 
  <careers>0</careers> 
  <contact>0</contact> 
  <downloads>0</downloads> 
  <enquiry>0</enquiry> 
  <gwd>1</gwd> 
  <indiaSolution>0</indiaSolution> 
  <news>0</news> 
  <productEngineering>0</productEngineering> 
  <products>0</products> 
  <supportServices>0</supportServices> 
  <testimonials>0</testimonials> 
  </pages>
  </customerList>

Answer : Login user using xml as database(C#)

Check examples here:
http://msdn.microsoft.com/en-us/library/1b1y85bh(VS.71).aspx
http://www.15seconds.com/issue/020305.htm
Concept with DB or XML or web.config will remain same...difference is just accessing username/password.
at the end you will have to set FormsAuthentication cookie... upon successful validation.
Random Solutions  
 
programming4us programming4us