Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralRe: Text Compression Algorithm Pin
wobble18-Aug-02 6:44
wobble18-Aug-02 6:44 
GeneralRe: Text Compression Algorithm Pin
Stephane Rodriguez.18-Aug-02 6:56
Stephane Rodriguez.18-Aug-02 6:56 
GeneralRe: Text Compression Algorithm Pin
Daniel Turini19-Aug-02 8:04
Daniel Turini19-Aug-02 8:04 
GeneralFile Summary Pin
Anonymous17-Aug-02 9:39
Anonymous17-Aug-02 9:39 
GeneralRe: File Summary Pin
Nnamdi Onyeyiri17-Aug-02 9:53
Nnamdi Onyeyiri17-Aug-02 9:53 
GeneralRe: File Summary - I tried that already Pin
Anonymous17-Aug-02 10:03
Anonymous17-Aug-02 10:03 
GeneralRe: File Summary Pin
James T. Johnson17-Aug-02 13:20
James T. Johnson17-Aug-02 13:20 
GeneralRemoting Question Pin
stephen woolhead17-Aug-02 8:52
stephen woolhead17-Aug-02 8:52 
I am writing a simple remoting server and have a little problem.

everytime I restart the server after it has been used by a client I get the following error.

Only one usage of each socket address (protocol/network address/port) is normally permitted

If I leave the machine for about 5 minutes then the problem goes away.

The server code I am using looks like this...
<br />
TcpServerChannel channel = null ;<br />
try<br />
{<br />
   channel = new TcpServerChannel (8088) ;<br />
   ChannelServices.RegisterChannel (channel) ;<br />
   RemotingConfiguration.RegisterWellKnownServiceType (<br />
   typeof (ClassLibrary.Class1), "Hi", WellKnownObjectMode.SingleCall) ;<br />
<br />
   System.Console.WriteLine ("Hit <enter> to exit") ;<br />
   System.Console.ReadLine () ;<br />
}<br />
catch (System.Exception err)<br />
{<br />
   System.Windows.Forms.MessageBox.Show (err.Message) ;<br />
}<br />
finally<br />
{<br />
   if (channel != null)<br />
   {<br />
      ChannelServices.UnregisterChannel (channel) ;<br />
   }<br />
}


As far as I can tell the unregister Channel always gets called.

How do I ensure that the channel is released so it can be reused?

Thanks

Stephen
GeneralRe: Remoting Question Pin
Sijin18-Aug-02 20:00
Sijin18-Aug-02 20:00 
GeneralRe: Remoting Question Pin
stephen woolhead18-Aug-02 22:28
stephen woolhead18-Aug-02 22:28 
GeneralRe: Remoting Question - Really confussed now!! Pin
stephen woolhead19-Aug-02 1:03
stephen woolhead19-Aug-02 1:03 
GeneralRe: Remoting Question Pin
Sijin21-Aug-02 5:54
Sijin21-Aug-02 5:54 
GeneralRe: Remoting Question Pin
stephen woolhead21-Aug-02 11:46
stephen woolhead21-Aug-02 11:46 
GeneralLaunch the Internet Explorer... Pin
Vortex17-Aug-02 7:00
Vortex17-Aug-02 7:00 
GeneralRe: Launch the Internet Explorer... Pin
Nnamdi Onyeyiri17-Aug-02 7:06
Nnamdi Onyeyiri17-Aug-02 7:06 
GeneralRe: Launch the Internet Explorer... Pin
wobble17-Aug-02 7:13
wobble17-Aug-02 7:13 
GeneralRe: Launch the Internet Explorer... Pin
Nnamdi Onyeyiri17-Aug-02 7:16
Nnamdi Onyeyiri17-Aug-02 7:16 
GeneralMySQL databases Pin
Nnamdi Onyeyiri17-Aug-02 6:53
Nnamdi Onyeyiri17-Aug-02 6:53 
GeneralRe: MySQL databases Pin
Nathan Blomquist17-Aug-02 7:25
Nathan Blomquist17-Aug-02 7:25 
GeneralRe: MySQL databases Pin
Anonymous17-Aug-02 9:32
Anonymous17-Aug-02 9:32 
GeneralInheritance question Pin
leppie17-Aug-02 3:33
leppie17-Aug-02 3:33 
GeneralRe: Inheritance question Pin
James T. Johnson17-Aug-02 4:04
James T. Johnson17-Aug-02 4:04 
GeneralRe: Inheritance question Pin
leppie17-Aug-02 4:44
leppie17-Aug-02 4:44 
GeneralRe: Inheritance question Pin
James T. Johnson17-Aug-02 5:38
James T. Johnson17-Aug-02 5:38 
GeneralRe: Inheritance question Pin
leppie17-Aug-02 6:02
leppie17-Aug-02 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.