Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How to load large XMl File data into dataset using C#?

when i bind xml data to dataset getting "The operation has timed out" excepton.

In C# Code written this way:
-----------------------------
C#
using (DataSet objDs = new DataSet())
                     {
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strUrlAddress);
  request.KeepAlive = true;

   using (WebResponse response = request.GetResponse())
       {
      using (XmlReader reader = XmlReader.Create(response.GetResponseStream()))
          {
             objDs.ReadXml(reader);
             reader.Close();

          }
       response.Close();
    }


when i used above code got "The operation has timed out" exception.
please provide solution how to resolve it. please do needful to me.

Thanks,
Ramu
Posted
Comments
aarif moh shaikh 23-Sep-15 8:42am    
Increase Default TimeOut of your Connection Object..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900