Click to See Complete Forum and Search --> : HttpWebResponse takes too much time


asafaa
April 3rd, 2008, 11:40 AM
some company sent me an example url of their service.
this url (link) is an http request that request an xml document response from their server.

when i click the http request link that was sent to me ,i get the response in the IE window ,in about 2 seconds.

but when i use this code in my project:

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http:......the url that was sent to me");

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

the response takes 30 seconds!!

why ?