locked
Handling Timeout issue with XMLDocument.Load RRS feed

  • Question

  • User1343698076 posted

    Hi,

    I need to load the 50 urls in xmldocument.load I am getting  "operation has timed out " error after loading 10 urls.

    System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);

    req.Timeout = 100000 * 60 * 5;

    System.Net.WebResponse res = req.GetResponse();

    Stream responseStream = res.GetResponseStream();

    XmlDocument myXMLDocument = new XmlDocument();

    myXMLDocument.Load(responseStream);

     

    Thanks,Madhavi

    Wednesday, October 19, 2011 4:47 AM

Answers

  • User1622957740 posted

    What actually times out? Your server method or the HttpWebRequest call to the URL you're calling?

    You can adjust the application's Response timeout in web.config in httpRuntime || executionTimeout.

    +++ Rick ---

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 20, 2011 3:18 AM