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.Crea te() 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.Crea te()? 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 2 1446
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.
<ol**********@z urich.ch> wrote in message
news:40******@n ews.zurich-datacenter.com. .. 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.Crea te() 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.Crea te()? 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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Aaron |
last post by:
tcpclient socket webrequest
what are each used for? I read some reference books and did some research on
the internet, but I'm still confused.
could someone clarify this for me?
Thanks,
Aaron
|
by: Paul |
last post by:
Hello,
I tried to execute a button on an aspx webpage using WebRequest, but it
failed.
When posting data as if I did a login (see code), I just receive the
login page, instead of the page I should get after login.
The button I tried to 'push' (by adding &login=Login in de posted data,
where login is the name of the login button - I verified this data by
capturing the data of a request using a webbrowser) has not executed.
|
by: Paul |
last post by:
Hello,
First I want to refer to the problem "WebRequest : execute a button" of
a few days ago.
The way I solved it, I loose my session, and as a consequence my
session variables. I don't want to keep those variables, as an
alternative, as ViewState variables because I don't want to transfer to
many hidden fields.
This is the code I use :
|
by: GSK |
last post by:
This one has me stumped:
I am using HttpWebRequest to resolve an external URL (that outputs an XML
string). It works fine on my dev machine (W2K), and used to work on my
production machine (W2K3). It seems that now, for some reason, the
connection cannot be established. The error logged is:
The underlying connection was closed: Unable to connect to the remote
server." source="System" stack="at...
|
by: Nelson R. |
last post by:
Hi,
i need to get some info from a website page that requires an
certificate.
Ive got the provided certificate installed in IE, and when accessing
the website page, it shows a window to select the client certificate
and then shows the page correctly.
Im trying to do this by code (vs2003 C# aspnet), using webrequest.
| |
by: kkb |
last post by:
Hello!
First, I'm sorry because of my english... I'll try to be
understandable!
I've got a strange problem using .NET 2003 C# and I haven't figured it
out for a long time. I'm implementing an application to download images
using System.NET classes (webclient, webrequest) asynchronously behind
proxy server. The reading method works like this:
System.Net.WebClient client=new System.Net.WebClient();
|
by: Jack |
last post by:
I have a WebRequest object that I use to log into a site and then post some
XML. In doing this I set the KeepAlive = true so that it maintains the
connection and does operates undo the initial login.
Is there a way to force this connection to close after I an done with it.
What happens is that I may need to post the XML in several chunks due to
size therefore I cannot set the KeepAlive to False when I post the XML and
the way the code...
|
by: buccsailor |
last post by:
Hell there,
I tried to post a reply to a message thread created back in July 2006
regarding the override of WebRequest, Closed Conenctions and setting
KeepAlive to false,but it's been over 60 days so I am creating a new
topci in the hopes of an answer to a related issue.
GhostAK suggested some vb.net code that should work to allow the
setting of the Keep Alive property. yes, I am having connection close
errors. The code suggested...
|
by: =?Utf-8?B?Sm9obkJhdGVz?= |
last post by:
I'm trying to (programatically) backup and clear the security event log on
the local machine. I can do this manually through the event viewer and I am
logged on as an administrator. I can successfully connect to the local wmi
service. I can step through and list all the log files on the local computer
in a text box so I know I can get an System.Management.ManagementObject that
is the security log.
However when I try to execute the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |