[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

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

Gilad Ravid

8/19/2004 10:09:00 AM

Hi,

I got the following error. I search the web and found many discussions and
solutions all of them like http://p2p.wrox.com/topic.asp?TOP...
the problem I use remoting and not webservie. I dont have
reference.cs file. do you have any solution? which function to
override ? where to place the code?

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.ProcessRespons
eException(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)


4 Answers

Sam Santiago

8/20/2004 5:52:00 AM

0

What type of remote object is it? SAO or CAO? Could it be that you need to
override the lifetime lease of your remote object?

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Gilad Ravid" <gilad@openu.ac.il> wrote in message
news:uyUxVuchEHA.1356@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I got the following error. I search the web and found many discussions and
> solutions all of them like http://p2p.wrox.com/topic.asp?TOP...
> the problem I use remoting and not webservie. I dont have
> reference.cs file. do you have any solution? which function to
> override ? where to place the code?
>
> 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.ProcessRespons
> eException(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)
>
>


Gilad Ravid

8/22/2004 9:04:00 AM

0

The remote object is CAO.

I think the problem is with the keep-alive header in the http request. In
case the client connects directly to the server all work just fine. If the
client connects to the server via proxy server I get this error.

How I can set the HttpChanel NOT to use kepp-alive ????



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.ProcessRespons
> > eException(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)
> >
> >
>
>


Sam Santiago

8/22/2004 3:31:00 PM

0

I don't think this is a client side setting, you normally configure this on
the server. In this article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenetc...

they recommend turning it off. Here's an excerpt:
<
Turn Off HTTP Keep-Alives When Using IIS
The HTTP protocol provides a mechanism to prevent browsers from having to
open several connections, just to bring back all the data for a page. HTTP
keep-alives enable the browser to open one connection with the server and
maintain that connection for the life of the communication. This can greatly
increase the browser's performance because it can make multiple requests for
several different graphics to render a page.

A .NET remote method call does not require the connection to remain open
across requests. Instead, each method call is a self-contained request. By
turning off HTTP keep-alives, the server is allowed to free unneeded
connections as soon as a method call completes.

To turn off HTTP keep-alives in IIS

1.. Open the Internet Information Services Microsoft Management Console
(MMC) snap-in.
2.. Right-click your Web site (not the application's virtual directory),
and then click Properties.
3.. Clear the HTTP Keep-Alives Enabled checkbox.
>

Thanks,

Sam


--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Gilad Ravid" <gilad@openu.ac.il> wrote in message
news:O$Uzy3BiEHA.2540@TK2MSFTNGP10.phx.gbl...
> The remote object is CAO.
>
> I think the problem is with the keep-alive header in the http request. In
> case the client connects directly to the server all work just fine. If the
> client connects to the server via proxy server I get this error.
>
> How I can set the HttpChanel NOT to use kepp-alive ????
>
>
>
> 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.ProcessRespons
> > > eException(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)
> > >
> > >
> >
> >
>
>


Gilad Ravid

8/23/2004 11:29:00 AM

0

Sam,

Thanks alot fpr your reply. I allready disabled the keep alive in the IIS.
and when the Client connect directly to the server i had no problems at all.
but in some cases there is proxy (http proxy) between the client and ther
server so the client and the http proxy connect with the keep alive property
on. so I need a method to disable the keep alive in the client side.

thanks for you help,

Gilad

"Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message
news:%23iqzO0FiEHA.1652@TK2MSFTNGP09.phx.gbl...
> I don't think this is a client side setting, you normally configure this
on
> the server. In this article:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenetc...
>
> they recommend turning it off. Here's an excerpt:
> <
> Turn Off HTTP Keep-Alives When Using IIS
> The HTTP protocol provides a mechanism to prevent browsers from having to
> open several connections, just to bring back all the data for a page. HTTP
> keep-alives enable the browser to open one connection with the server and
> maintain that connection for the life of the communication. This can
greatly
> increase the browser's performance because it can make multiple requests
for
> several different graphics to render a page.
>
> A .NET remote method call does not require the connection to remain open
> across requests. Instead, each method call is a self-contained request. By
> turning off HTTP keep-alives, the server is allowed to free unneeded
> connections as soon as a method call completes.
>
> To turn off HTTP keep-alives in IIS
>
> 1.. Open the Internet Information Services Microsoft Management Console
> (MMC) snap-in.
> 2.. Right-click your Web site (not the application's virtual directory),
> and then click Properties.
> 3.. Clear the HTTP Keep-Alives Enabled checkbox.
> >
>
> Thanks,
>
> Sam
>
>
> --
> _______________________________
> Sam Santiago
> ssantiago@n0spam-SoftiTechture.com
> http://www.SoftiTe...
> _______________________________
> "Gilad Ravid" <gilad@openu.ac.il> wrote in message
> news:O$Uzy3BiEHA.2540@TK2MSFTNGP10.phx.gbl...
> > The remote object is CAO.
> >
> > I think the problem is with the keep-alive header in the http request.
In
> > case the client connects directly to the server all work just fine. If
the
> > client connects to the server via proxy server I get this error.
> >
> > How I can set the HttpChanel NOT to use kepp-alive ????
> >
> >
> >
> > 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.ProcessRespons
> > > > eException(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)
> > > >
> > > >
> > >
> > >
> >
> >
>
>