Author: tarek_909 | Posted on: 9/22/2009 5:56:57 AM | Views : 641

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 ...

Go to the complete details ...