none
httpwebresponse.close method RRS feed

  • Question

  • Hi 

    In .net framework 3.5 , http 1.1 i.e persistent connections is used and pipelining is enabled bydefault. Could you please let me know it is neccessary to close stream or connection by calling httpresponse.close or stream.close method to release a connection for another http request to the same internet resourece ? My understanding is even if httpresponse.close or stream.close is not called then too httpconnection i.e. servicepoint should be able to server another concurrent request. Please confirm.



    • Edited by LearnerPR Tuesday, August 27, 2013 3:12 AM
    Tuesday, August 27, 2013 3:10 AM

All replies

  • You need to call the HttpWebrequest construtor every time you send a request, and you can't create the request without closing the response first.

    jdweng

    Tuesday, August 27, 2013 3:33 AM
  • I don't agree with your comments. IF you cannot send multiple requests without closing stream/connection what is the point of httppiplelining? Please write a simple application to check whether you are able to send multiple requests or not ? Make sure your protocol is http 1.1
    Wednesday, August 28, 2013 1:06 AM