WebRequest, Connection management

O

oliver.wulff

Hi
My ASP.NET application has to send https requests to other web servers
quite often. I'd like to know how I should manage the connections? Does
the method WebRequest.Create() reuses an existing https connection to the
destination server or will a new one created for each call? Can several
threads use the same instance returned by WebRequest.Create()? If yes,
will the requests be serialized or will they be called in parallel?
This is quite important to me because I have to use HTTPS and don't want
to establish a connection each time. Ideally, I'd prefer one multithreaded
HTTPS connection.
Thanks for your help!

Oli
 
K

Kevin Spencer

HTTP is stateless, which means that each HTTP request occurs independently
of any others. An HTTP Request is just that - a message sent to a server
requesting something. The "connection" exists only long enough to send the
Request.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
O

oliver.wulff

You're right that HTTP is stateless. But you need to cache some data in a
user session on the server. The session is identified by url rewriting or
a cookie. This information is sent with each request. I'm quite familiar
with session handling in Java servlets but don't know how it is
implemented in .NET.
I hope that there is a solution because otherwise it won't perform well
with HTTPS.
 

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