Click here to Skip to main content
14,364,120 members
Rate this:
Please Sign up or sign in to vote.
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:
-----------------------------
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100