HttpWebRequest taking lot more than ServerXmlHTTP

A

anshu

Hi,

I've to migrate an existing code in asp to asp.Net. The asp code uses
ServerXMLHTTP to call some services. Same thing will be done using
HttpWebRequest in the asp.Net code. The problem is keeping everything
same HttpWebRequest takes around 100-200ms more than ServerXMLHTTP to
call the service.

The bottleneck was HttpWebRequest.GetResponse, which was taking most
of time. Once I set the ContentLength for HttpWebRequest object it
seems bottleneck shifts to HttpRequest.GetRequestStream(). I think its
taking time writing the content to the stream or initializing the
stream.

What ever it is doing 100-200ms extra time per call is too much. Does
some one know a better way to do this?

Regards
Sudhanshu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top