[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

SocketException: Only one usage of each socket address.

gadekark

6/15/2004 7:19:00 AM

Hi All,
I have developed a simple dotnet remoting application.
My server is in a dll and a host application activates the server by
using following code:

HttpChannel chnl = new HttpChannel(1234);
ChannelServices.RegisterChannel(chnl);
RemotingConfiguration.RegisterWellKnownServiceType( typeof( Server ),
"Server.soap",
WellKnownObjectMode.Singleton
);

and when i am done with the work i just unregister the channel.

ChannelServices.UnregisterChannel(chnl);

but again when i activate the server object with the above code i get
the following error:

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

whether i am doing any mistake while unregistering a channel?
or not doing proper clean up?

any help is most welcome.

thanks in advance.
3 Answers

gadekark

6/16/2004 8:41:00 AM

0

Hi Serg,
Thanks for your reply.
I have checked all installed software but ISAFirewallClient is not
installed on my pc still i am facing problem. Please can provide some
more information to me which will help me to solve this problem.

regards,
kiran gadekar

"Serg" <serg_N0__SPAM_@alef.ru> wrote in message news:<#dV$YmtUEHA.2504@TK2MSFTNGP11.phx.gbl>...
> I have experienced similar behaviour.
> In my case it was because of ISAFirewallClient.
> When i am disabling ISAFirewallClient all works ok.
> I think .NetFramework (v1.1) works incorrectly with ISAFirewall.
> There is a timeout ~10min after stopping server application when ISAFirewall
> frees socket.
> If you dont want to disable firewall you should wait ~10min each time you
> have stopped server application.
>
>
>
> "Kiran" <gadekark@yahoo.com> ???????/???????? ? ???????? ?????????:
> news:6bd1217d.0406142318.7a057699@posting.google.com...
> > Hi All,
> > I have developed a simple dotnet remoting application.
> > My server is in a dll and a host application activates the server by
> > using following code:
> >
> > HttpChannel chnl = new HttpChannel(1234);
> > ChannelServices.RegisterChannel(chnl);
> > RemotingConfiguration.RegisterWellKnownServiceType( typeof( Server ),
> > "Server.soap",
> > WellKnownObjectMode.Singleton
> > );
> >
> > and when i am done with the work i just unregister the channel.
> >
> > ChannelServices.UnregisterChannel(chnl);
> >
> > but again when i activate the server object with the above code i get
> > the following error:
> >
> > "Only one usage of each socket address(protocol/network
> > address/port)is normally permitted."
> >
> > whether i am doing any mistake while unregistering a channel?
> > or not doing proper clean up?
> >
> > any help is most welcome.
> >
> > thanks in advance.

Serg

6/16/2004 12:02:00 PM

0

Hi Kiran,
1. Check FireWallClient in ControlPanel. May be it is not visible in
trackbar(and task manager), but is active.
2. May be there is other FireWall not ISA
3. And the last method to find problem is to stop all services on pc one by
one and checking after wich it will begin to work.



"Kiran" <gadekark@yahoo.com> ???????/???????? ? ???????? ?????????:
news:6bd1217d.0406160040.2e6c6a66@posting.google.com...
> Hi Serg,
> Thanks for your reply.
> I have checked all installed software but ISAFirewallClient is not
> installed on my pc still i am facing problem. Please can provide some
> more information to me which will help me to solve this problem.
>
> regards,
> kiran gadekar
>
> "Serg" <serg_N0__SPAM_@alef.ru> wrote in message
news:<#dV$YmtUEHA.2504@TK2MSFTNGP11.phx.gbl>...
> > I have experienced similar behaviour.
> > In my case it was because of ISAFirewallClient.
> > When i am disabling ISAFirewallClient all works ok.
> > I think .NetFramework (v1.1) works incorrectly with ISAFirewall.
> > There is a timeout ~10min after stopping server application when
ISAFirewall
> > frees socket.
> > If you dont want to disable firewall you should wait ~10min each time
you
> > have stopped server application.
> >
> >
> >
> > "Kiran" <gadekark@yahoo.com> ???????/???????? ? ???????? ?????????:
> > news:6bd1217d.0406142318.7a057699@posting.google.com...
> > > Hi All,
> > > I have developed a simple dotnet remoting application.
> > > My server is in a dll and a host application activates the server by
> > > using following code:
> > >
> > > HttpChannel chnl = new HttpChannel(1234);
> > > ChannelServices.RegisterChannel(chnl);
> > > RemotingConfiguration.RegisterWellKnownServiceType( typeof( Server ),
> > > "Server.soap",
> > > WellKnownObjectMode.Singleton
> > > );
> > >
> > > and when i am done with the work i just unregister the channel.
> > >
> > > ChannelServices.UnregisterChannel(chnl);
> > >
> > > but again when i activate the server object with the above code i get
> > > the following error:
> > >
> > > "Only one usage of each socket address(protocol/network
> > > address/port)is normally permitted."
> > >
> > > whether i am doing any mistake while unregistering a channel?
> > > or not doing proper clean up?
> > >
> > > any help is most welcome.
> > >
> > > thanks in advance.


Sunny

6/16/2004 2:20:00 PM

0

Hi Kiran
I have posted an answer to your post in dotnet.framework newsgroup.
Please, do not crosspost, or at least post the message with all
newsgroups in the to: line, it''ll be easier to follow them.

Here is a copy of my answer:

Hi,

there is a time delay for the system to release the port. It is about 2
minutes. After that the port is free and you can reuse it.
But, why do you need to unregister the channel. You may not use
RegisterWllKnownService, but use RemotingServices.Marshal to expose your
singleton. And when you want to stop the access to it, you can invoke
Disconnect on the object.

Hope that helps
Sunny


In article <6bd1217d.0406160040.2e6c6a66@posting.google.com>,
gadekark@yahoo.com says...
> Hi Serg,
> Thanks for your reply.
> I have checked all installed software but ISAFirewallClient is not
> installed on my pc still i am facing problem. Please can provide some
> more information to me which will help me to solve this problem.
>
> regards,
> kiran gadekar
>
> "Serg" <serg_N0__SPAM_@alef.ru> wrote in message news:<#dV$YmtUEHA.2504@TK2MSFTNGP11.phx.gbl>...
> > I have experienced similar behaviour.
> > In my case it was because of ISAFirewallClient.
> > When i am disabling ISAFirewallClient all works ok.
> > I think .NetFramework (v1.1) works incorrectly with ISAFirewall.
> > There is a timeout ~10min after stopping server application when ISAFirewall
> > frees socket.
> > If you dont want to disable firewall you should wait ~10min each time you
> > have stopped server application.
> >
> >
> >
> > "Kiran" <gadekark@yahoo.com> ???????/???????? ? ???????? ?????????:
> > news:6bd1217d.0406142318.7a057699@posting.google.com...
> > > Hi All,
> > > I have developed a simple dotnet remoting application.
> > > My server is in a dll and a host application activates the server by
> > > using following code:
> > >
> > > HttpChannel chnl = new HttpChannel(1234);
> > > ChannelServices.RegisterChannel(chnl);
> > > RemotingConfiguration.RegisterWellKnownServiceType( typeof( Server ),
> > > "Server.soap",
> > > WellKnownObjectMode.Singleton
> > > );
> > >
> > > and when i am done with the work i just unregister the channel.
> > >
> > > ChannelServices.UnregisterChannel(chnl);
> > >
> > > but again when i activate the server object with the above code i get
> > > the following error:
> > >
> > > "Only one usage of each socket address(protocol/network
> > > address/port)is normally permitted."
> > >
> > > whether i am doing any mistake while unregistering a channel?
> > > or not doing proper clean up?
> > >
> > > any help is most welcome.
> > >
> > > thanks in advance.
>