aletz
10-25-2007, 09:22 PM
Hi,
Sorry for my english.
i create a windows service with spring.net, i installed this in a windows server 2003, the remoting service works fine (Send/Recive message queue), but when i stop the service from service management...it stops fine, but when i start the service again...this sendme a error like this....
"Error creating context 'spring.root': Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Sólo se permite un uso de cada dirección de socket (protocolo/dirección de red/puerto)\r\n at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)\r\n at System.Net.Sockets.Socket.Bind(EndPoint localEP)\r\n at System.Net.Sockets.TcpListener.Start(Int32 backlog)\r\n at System.Net.Sockets.TcpListener.Start()\r\n at System.Runtime.Remoting.Channels.ExclusiveTcpListe ner.Start(Boolean exclusiveAddressUse)\r\n at System.Runtime.Remoting.Channels.Tcp.TcpServerChan nel.StartListening(Object data)\r\n at System.Runtime.Remoting.Channels.Tcp.TcpServerChan nel.SetupChannel()\r\n at System.Runtime.Remoting.Channels.Tcp.TcpServerChan nel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)\r\n at System.Runtime.Remoting.Channels.Tcp.TcpChannel..c tor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle._InvokeConstructor(Obje ct[] args, SignatureStruct& signature, IntPtr declaringType)\r\n at System.RuntimeMethodHandle.InvokeConstructor(Objec t[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)\r\n at System.Reflection.RuntimeConstructorInfo.Invoke(Bi ndingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)\r\n at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)\r\n at System.Runtime.Remoting.RemotingConfigHandler.Crea teChannelFromConfigEntry(ChannelEntry entry)\r\n at System.Runtime.Remoting.RemotingConfigHandler.Conf igureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)\r\n at System.Runtime.Remoting.RemotingConfigHandler.Conf igureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'."
I think that the remoting service port still keep alive
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="8005"/>
</channels>
</application>
</system.runtime.remoting>
when i stoped the service, the windows service calls the OnStop method and i dispose the context like this..
this.ctx.Dispose();
this.ctx = null;
but the port doesnt close...
do u have an idea???
Thank you in advance
Sorry for my english.
i create a windows service with spring.net, i installed this in a windows server 2003, the remoting service works fine (Send/Recive message queue), but when i stop the service from service management...it stops fine, but when i start the service again...this sendme a error like this....
"Error creating context 'spring.root': Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Sólo se permite un uso de cada dirección de socket (protocolo/dirección de red/puerto)\r\n at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)\r\n at System.Net.Sockets.Socket.Bind(EndPoint localEP)\r\n at System.Net.Sockets.TcpListener.Start(Int32 backlog)\r\n at System.Net.Sockets.TcpListener.Start()\r\n at System.Runtime.Remoting.Channels.ExclusiveTcpListe ner.Start(Boolean exclusiveAddressUse)\r\n at System.Runtime.Remoting.Channels.Tcp.TcpServerChan nel.StartListening(Object data)\r\n at System.Runtime.Remoting.Channels.Tcp.TcpServerChan nel.SetupChannel()\r\n at System.Runtime.Remoting.Channels.Tcp.TcpServerChan nel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)\r\n at System.Runtime.Remoting.Channels.Tcp.TcpChannel..c tor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle._InvokeConstructor(Obje ct[] args, SignatureStruct& signature, IntPtr declaringType)\r\n at System.RuntimeMethodHandle.InvokeConstructor(Objec t[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)\r\n at System.Reflection.RuntimeConstructorInfo.Invoke(Bi ndingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)\r\n at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)\r\n at System.Runtime.Remoting.RemotingConfigHandler.Crea teChannelFromConfigEntry(ChannelEntry entry)\r\n at System.Runtime.Remoting.RemotingConfigHandler.Conf igureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)\r\n at System.Runtime.Remoting.RemotingConfigHandler.Conf igureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'."
I think that the remoting service port still keep alive
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="8005"/>
</channels>
</application>
</system.runtime.remoting>
when i stoped the service, the windows service calls the OnStop method and i dispose the context like this..
this.ctx.Dispose();
this.ctx = null;
but the port doesnt close...
do u have an idea???
Thank you in advance