I have two URl's . If I open first url it will allow us authentication. Second URL will open web content as XML data. I need to read that data... But when I excute first URL its working fine Authentication is SUCCESS, But immediately I try to open second URL its saying Authentication failed . How to maintain session from first URL to second URL...
My Code :
string url1 = "http://172.xx.xx.xx:xxxx/cms?login&username=santhu&password=welcom0e";
string url = "http://172.xx.xx.xx:xxxx//cms?status=ProcessStatus";
string result = null;
string result1 = null;
try
{
WebClient client = new WebClient();
result = client.DownloadString(url1);
TextBox1.Text = result.ToString();
result1 = client.DownloadString(url);
TextBox2.Text = result1.ToString();
}
catch (Exception ex)
{
}