Hi All,
I am connecting to our applications's server, using HttpWebRequest.
but the HttpWebRequest.GetResponse() is taking long time when i am running load test.
GetRequestStream takes ~1000 ms seconds for first 2 or 3 requests, and the getResponse() time taken is upto ~350 ms each time, whihc is too much for our application.
My Code is :
WebRequest.DefaultWebProxy = null; // I have put this line after reading in google but still no luck
System.Net.HttpWebRequest httpURLConnection = null;
httpURLConnection = (HttpWebRequest)WebRequest.Create(argURI);
httpURLConnection.CachePolicy = noCachePolicy;
httpURLConnection.Timeout = m_connectionTimeOut;
httpURLConnection.ReadWriteTimeout = m_readTimeOut;
httpURLConnection.AllowAutoRedirect = true;
httpURLConnection.Proxy = null;
httpURLConnection.UserAgent = "XXXXX";
httpURLConnection.Headers.Add(HttpUtils.ACCEPTED_ENCRYPTION, protocolName);
System.IO.Stream outputStream = httpURLConnection.GetRequestStream(); //This line takes ~1000 ms for first 1 or requests,
HttpWebResponse response = (HttpWebResponse)conn.GetResponse(); // This line always takes ~500 ms
Please help me in improving the perormance,
I am using Windows XP and .Net 3.5
Thanks,
Yashu .