Posted on: 3/29/2012 3:38:12 AM | Views : 373

Hello,
I would like to reteive an XML file using HTTPWebRequest (please see code below). It works fine under Visual Studio but under IIS I have the following error :
[SocketException (02X274c): A connection attempt failed because the connected party did not properly responf after a period of time, .....

Any idea please to fix it ?
Thanks

CODE HttpWebRequest request = WebRequest.Create("http://xxxxxxxxxxx") as HttpWebRequest; request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"; request.Method = "GET"; request.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; request.Accept = "text/xml"; request.AllowAutoRedirect = true; request.Proxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; //request.Proxy = HttpWebReques ...

Go to the complete details ...