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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top