次の方法で共有


Understanding HttpWebRequest Connection Management and ServicepointManager

If you are looking for some information on understanding the basics of HttpWebRequest connection management and servicepointmanager, I just posted an article which could be useful for you.

https://blogs.msdn.com/adarshk/articles/345411.aspx 

This is first in the series, in future posting I promise to provide more details about specific scenarios which include Http with authentication and proxy server and also for other protocols like FtpWebRequest and SmtpClient, which were added in .net frameworks 2.0.

Comments

  • Anonymous
    January 02, 2005
    Hi

    I'm using HttpWebRequest to SSL url (in the internet) and sometimes get the following error:

    "The underlying connection
    was closed: Could not establish secure channel for SSL/TLS".

    It is asp.net application and runs under asp.net user. Sometimes it uses impersonation when it has to deal with active directory on the local network. What may be the cause of the problem, what do you think ?
  • Anonymous
    January 21, 2005
    Hi Anatoly,
    send me message with your email address and contains details of your problem, the problem you did send earlier did not have sufficient information to respond.

    The question did not have enough data, tell me which server you are making request. Most probable cause I can guess (only guess, there might be other reasons too) is server certificate validation error which could be resolved with implementing custom ICertificatePolicy.
  • Anonymous
    January 21, 2005
    Hi Adarsh

    The issue is solved and I answered you here:

    http://blogs.x2line.com/al/archive/2005/01/04/759.aspx#780

    Sorry for misunderstanding.
    Thanks anyway :)
  • Anonymous
    June 20, 2008
    Hi ,I m sending httpwebrequest request to one webservice. but it always fails first time. Second time onwards it starts working when I impelmented sessions. Why request is failing first time?