Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In your case, there are two things that are in the picture, the size of the entity body that you are posting, and the authentication method that you are using.</p> <p>Also, the .NET HttpWebRequest does not send the request headers and POST body in one shot. It first sends the request headers (it adds a Expect: 100-continue header to the outgoing request). Now, if the server is ready to accept data, it should reply with "100 continue" response. Otherwise, it should send a final response, which in this case would probably be a "401 authentication denied". If the server does not send the "100 continue" within 350ms, then the cllient will go ahead and send the data.</p> <p>So, in order to optimize futher, we need to know:</p> <p>1) What is the authentication protocol? 2) What is the avg size of the XML body that you are posting? 3) Is the server doing any heavy handed operations with the XML? That would most probably explain why you are seeing the delay in GetResponse() rather than in GetRequestStream(). Some things to try:</p> <p>1) Set Expect100Continue=false on the servicepoint. 2) If your system is doing NTLM auth, then you could try the following: 1) create a GET webrerquest with credentials to the destination server. Set a connectionGroupNname on the request. Reuse the same connection group name for subsequent requests. Since the NTLM is mainly a connection auth mechanism, the first GET request will prime the connection for you, and subsequent requests will reuse that connection.</p> <p>One more thing, are you doing a multithreaded operation in which you are running simultaneous thread of the above code? In that case you are running into the connection limit issue on the client - there are a max 2 connections simultaneous per HTTP/1.1 server. You could try bumping the limit (ServicePointManager.DefaultConnectionLimit = 1000).</p> <p>Finally, as others have suggested, you may need to get a network sniff using wireshark/netmon in order to see where the delay lies.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload