The underlying connection was closed - Remoting.Channels.Http.HttpClientTransportSink

G

Gilad Ravid

Hi,

I got this error. I search the web and found a long disscus and
solutions for example at http://p2p.wrox.com/topic.asp?TOPIC_ID=4858
the problem I use remoting and not webservie. I dont have
reference.cs file. do you have any solution? which function to
overload ? wehre?

TIA

Gilad

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a receive.

Server stack trace:

at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessResponseException(WebException
webException, HttpWebResponse& response)
at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SyncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
 
R

Rajeev Tipnis

Hi -

I am having a similar problem:

However, in my case the scenario is as follows:

Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)

2. Web Services Server:
A .Net web service (long running, so using server side
asynchronous web methods).
Hosted on IIS 6.0 (on Win2K3) on .NET 1.1 Framework.


I start to see the following errors when the load goes
beyond a certain threshold
(about 25 connections, I believe are open at that point).

System.Net.WebException: The operation has timed-out.
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invok
e(String methodN
ame, Object[] parameters)


System.Net.WebException: The underlying connection was
closed: The request was c
anceled.
at
System.Web.Services.Protocols.WebClientProtocol.GetWebResp
onse(WebRequest
request)
at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWeb
Response(WebRequ
est request)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invok
e(String methodN
ame, Object[] parameters)


Now, I have googled and read "many many articles" around
this problem
including this article from KB:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;819450


What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the
client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really
long timeouts

I havent asked for the beta-fix from Microsoft (as
mentioned in the article) yet.

My questions are:
1. Do I need this fix/patch? If I am using .NET 1.1, why
do I need this patch?
2. Will this really solve my problem?
3. I refuse to believe that a shipping Microsoft product
can have such a glaring bug
- not to mention in such a highly marketed / touted area
of "webservices"!

Rajeev Tipnis


-----Original Message-----
Hi,

I got this error. I search the web and found a long disscus and
solutions for example at http://p2p.wrox.com/topic.asp? TOPIC_ID=4858
the problem I use remoting and not webservie. I dont have
reference.cs file. do you have any solution? which function to
overload ? wehre?

TIA

Gilad

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a receive.

Server stack trace:

at System.Runtime.Remoting.Channels.Http.HttpClientTransportS
ink.ProcessResponseException(WebException
webException, HttpWebResponse& response)
at System.Runtime.Remoting.Channels.Http.HttpClientTransportS
ink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
System.Runtime.Remoting.Channels.SoapClientFormatterSink.S
yncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMess
age(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData&
msgData, Int32 type)
.
 
R

Rajeev Tipnis

Sorry. My problem _is_ with the webservices and with
the remoting.
I am going to post my question on the asp.net newsgroup.
Please ignore my post and apologies again!
-----Original Message-----

Hi -

I am having a similar problem:

However, in my case the scenario is as follows:

Two separate machines:
1. Web Services Client (for load testing):
A simple .net console app (.NET 1.1 Framework)

2. Web Services Server:
A .Net web service (long running, so using server side
asynchronous web methods).
Hosted on IIS 6.0 (on Win2K3) on .NET 1.1 Framework.


I start to see the following errors when the load goes
beyond a certain threshold
(about 25 connections, I believe are open at that point).

System.Net.WebException: The operation has timed-out.
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invo k
e(String methodN
ame, Object[] parameters)


System.Net.WebException: The underlying connection was
closed: The request was c
anceled.
at
System.Web.Services.Protocols.WebClientProtocol.GetWebRes p
onse(WebRequest
request)
at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWe
b
Response(WebRequ
est request)
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invo k
e(String methodN
ame, Object[] parameters)


Now, I have googled and read "many many articles" around
this problem
including this article from KB:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;819450


What I have experimented with so far:
- Cleared the keep-alive flag on the IIS and on the
client by overriding the
client proxy methods
- IIS 6.0 is configured to receive unlimited connections
and configured to have really
long timeouts

I havent asked for the beta-fix from Microsoft (as
mentioned in the article) yet.

My questions are:
1. Do I need this fix/patch? If I am using .NET 1.1, why
do I need this patch?
2. Will this really solve my problem?
3. I refuse to believe that a shipping Microsoft product
can have such a glaring bug
- not to mention in such a highly marketed / touted area
of "webservices"!

Rajeev Tipnis


-----Original Message-----
Hi,

I got this error. I search the web and found a long disscus and
solutions for example at http://p2p.wrox.com/topic.asp? TOPIC_ID=4858
the problem I use remoting and not webservie. I dont have
reference.cs file. do you have any solution? which function to
overload ? wehre?

TIA

Gilad

System.Net.WebException: The underlying connection was closed: An
unexpected error occurred on a receive.

Server stack trace:

at System.Runtime.Remoting.Channels.Http.HttpClientTransport
S
ink.ProcessResponseException(WebException
webException, HttpWebResponse& response)
at System.Runtime.Remoting.Channels.Http.HttpClientTransport
S
ink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
System.Runtime.Remoting.Channels.SoapClientFormatterSink.
S
yncProcessMessage(IMessage
msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMes
s
age(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData&
msgData, Int32 type)
.
.
 
S

Steve Willcock

Gilad, the first thing to do here is to make sure the channels on your
server object and client object match up - this error occurs if you attempt
to use the TcpChannel on one side of the link and the HtppChannel on the
other side of the link - make absolutely sure you are not doing this.

Steve
 
G

Gilad Ravid

Thanx for your quick replay. I use httpchanel for both the client and the server.

client.cs: m_channel = new HttpChannel(propsChan, clientProv, serverProv);
server.cs: HttpChannel chan = new HttpChannel(propsChan, clientProv, serverProv);

Any suggestions?

Gilad
 

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

Top