Re: Socket error when restarting host app
From: Orlin Popov (orlinpopov_at_covad.net)
Date: 03/10/04
- Next message: Vince Ranger: "Passing an Object as a property."
- Previous message: Mario Garcia: "Access to .NET Remoting stream"
- In reply to: Serg: "Re: Socket error when restarting host app"
- Next in thread: Serg: "Re: Socket error when restarting host app"
- Reply: Serg: "Re: Socket error when restarting host app"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 10 Mar 2004 09:34:47 -0800
TCP includes a mechanism to ensure that packets delayed by the network will
not be accepted by another connection to the same host and port combination.
This is ensured by leaving the connection in TIME_WAIT state for several
minutes. Wneh an endpoint closes a TCP connection, it keeps state about this
connection in TIME_WAIT for a few minutes. You can check that by typing
netstat -a in a command window.
Orlin
www.ppstec.com
"Serg" <serg_N0__SPAM_@alef.ru> wrote in message
news:O11AYUoBEHA.1452@TK2MSFTNGP09.phx.gbl...
> Thanks Allen.
>
> Had downloaded your example and get the same error.
> Try to do next
> 1. Start server.exe
> 2. Start client.exe
> 3. Stop client.exe
> 4. Stop server.exe
> 5. Start server.exe
>
> At 5 step I got the next exception.
> System.Net.Sockets.SocketException: ?????? ??????????? ???? ?????????????
> ?????? ??????
> (????????/??????? ?????/????)
> at
>
System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object
> data)
> at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
> at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(Int32
> port)
> at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(Int32 port)
> at Server.Server.Main(String[] args) in
> d:\dot_net_samples\remotingexample\server\class1.cs:line 28
>
> Russian text is transalted as "allowed single use of socket adress"
> The error is disappeared if i wait for about 10 minutes
> After that when i start server.exe first time all is ok.
> When i restart server.exe i got error again.
> It seems like after stopping server.exe socket is not freed immediately
> (only after 10 minutes).
> If i start/stop server.exe without starting client.exe error also does not
> appear.
> I use win2Ksrv_sp4 (russian)
> .NetFramework 1.1 as default (also i have installed 1.0 version )
>
>
>
> "Allen Anderson" <allen@sparkysystems.com> ???????/???????? ? ????????
> ?????????: news:rsas40p5q6rk3u5j4jdssdj6gmbnvc9fgq@4ax.com...
> > you are trying to open a port/channel on one that is currently already
> > still open. Is the code that registers your channel in the
> > application that stops or is it in a service that is holding your
> > code?
> >
> > try the example I have here
> >
> > http://www.glacialcomponents.com/ArticleDetail.aspx?articleID=CAOGuide
> >
> > also, if that still doesn't work, post some of your channel
> > registration code and I'll have a look.
> >
> >
> > Allen Anderson
> > http://www.glacialcomponents.com
> > mailto: allen@put my website url here.com
> >
> >
> > On Tue, 9 Mar 2004 03:26:05 -0800, "Serg" <serg_N0_SPAMM_@alef.ru>
> > wrote:
> >
> > >I am always getting an error "allowed single use of socket adress" when
i
> have to restart my host app.
> > >Error occurs only when i have created an clien activated object on
host.
> > >After that to restart my host app i have to change my port or wait for
> about 10 minutes, after that host app start successfully.
> > >I had downloaded an example TCPRemoting.exe from here
> > >
> >
>
>http://www.microsoft.com/downloads/details.aspx?FamilyID=601283d2-b72f-4aca
> -9b95-f96da2259780&displaylang=en
> > >
> > >and get the same error after i had created a client activated object.
> > >
> > >thanks in adv
> > >serg
> >
>
>
- Next message: Vince Ranger: "Passing an Object as a property."
- Previous message: Mario Garcia: "Access to .NET Remoting stream"
- In reply to: Serg: "Re: Socket error when restarting host app"
- Next in thread: Serg: "Re: Socket error when restarting host app"
- Reply: Serg: "Re: Socket error when restarting host app"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|