Welcome to MSDN Blogs Sign in | Join | Help

adarsh's blog

Adarsh Khare works at Microsoft. Everything here, though, is his personal opinion and is not read or approved by Microsoft before it is posted. No warranties or other guarantees will be offered as to the quality of the opinions or anything else offered here.
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.

http://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.

Posted: Sunday, January 02, 2005 2:34 AM by adarshk

Comments

Anatoly Lubarsky said:

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 ?
# January 2, 2005 1:45 PM

Anatoly Lubarsky: T-SQL Weblog said:

# January 3, 2005 9:02 PM

Anatoly Lubarsky: T-SQL Weblog said:

# January 21, 2005 6:58 AM

adarshk said:

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.
# January 21, 2005 2:18 PM

Anatoly Lubarsky said:

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 :)
# January 21, 2005 6:42 PM

Amol said:

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?

# June 20, 2008 4:01 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker