Hi
I'm writing an application using .net remoting, when the client is closed I get an error saing unhandled exception object reference no set to an instance of an object on the server side.
The dissasembly show the address of the error in System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback
The server offers two SAO singlecall object and one singleton. There is also a CAO. This is done without config files as follows:
HttpChannel chan = new HttpChannel(8888);
ChannelServices.RegisterChannel(chan);
WellKnownServiceTypeEntry remoteLineChartObject = new
WellKnownServiceTypeEntry(typeof(RemoteLineChartObject),
"RemoteLineChartObject.soap",
WellKnownObjectMode.SingleCall); RemotingConfiguration.RegisterWellKnownServiceType
(remoteLineChartObject);
WellKnownServiceTypeEntry remoteBarChartObject = new
WellKnownServiceTypeEntry(typeof(RemoteBarChartObject),
"RemoteBarChartObject.soap",
WellKnownObjectMode.SingleCall);
RemotingConfiguration.RegisterWellKnownServiceType
(remoteBarChartObject);
WellKnownServiceTypeEntry Authorisation = new
WellKnownServiceTypeEntry(typeof(Authorisation),
"Authorisation.soap",
WellKnownObjectMode.Singleton);
RemotingConfiguration.RegisterWellKnownServiceType
(Authorisation);
Authorisation athorise = new Authorisation();
RemotingConfiguration.ApplicationName =
"RemotingChartService.StockChartServer";
RemotingConfiguration.RegisterActivatedServiceType(typeof
(RemotingChartService.SessionKeyManager.ServerKeyExchange));
Then on the client: - using
HttpChannel chan = new HttpChannel(0);
ChannelServices.RegisterChannel(chan);
MarshalByRefObject barObj =(MarshalByRefObject)
RemotingServices.Connect(typeof(BarChartInterface),
"
MarshalByRefObject lineObj = (MarshalByRefObject)
RemotingServices.Connect(typeof(LineChartInterface),
"
MarshalByRefObject authObj = (MarshalByRefObject)
RemotingServices.Connect(typeof
(RemotingChartService.SecurityInterfaces.IAuthorisation),
"
RemotingConfiguration.RegisterActivatedClientType(typeof
(RemotingChartService.SessionKeyManager.ServerKeyExchange),
"
Every time the client is closed, the server crashes. This is my first .net remoting application, infact its my first .net application. Could it be something to do with the lifetime of the CAO or the singleton, as this is not managed or is there a standard way of disconnecting from the seerver without causing server errors, any help with this would be appreciated.
Thankyou.
Richard H.
I'm writing an application using .net remoting, when the client is closed I get an error saing unhandled exception object reference no set to an instance of an object on the server side.
The dissasembly show the address of the error in System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback
The server offers two SAO singlecall object and one singleton. There is also a CAO. This is done without config files as follows:
HttpChannel chan = new HttpChannel(8888);
ChannelServices.RegisterChannel(chan);
WellKnownServiceTypeEntry remoteLineChartObject = new
WellKnownServiceTypeEntry(typeof(RemoteLineChartObject),
"RemoteLineChartObject.soap",
WellKnownObjectMode.SingleCall); RemotingConfiguration.RegisterWellKnownServiceType
(remoteLineChartObject);
WellKnownServiceTypeEntry remoteBarChartObject = new
WellKnownServiceTypeEntry(typeof(RemoteBarChartObject),
"RemoteBarChartObject.soap",
WellKnownObjectMode.SingleCall);
RemotingConfiguration.RegisterWellKnownServiceType
(remoteBarChartObject);
WellKnownServiceTypeEntry Authorisation = new
WellKnownServiceTypeEntry(typeof(Authorisation),
"Authorisation.soap",
WellKnownObjectMode.Singleton);
RemotingConfiguration.RegisterWellKnownServiceType
(Authorisation);
Authorisation athorise = new Authorisation();
RemotingConfiguration.ApplicationName =
"RemotingChartService.StockChartServer";
RemotingConfiguration.RegisterActivatedServiceType(typeof
(RemotingChartService.SessionKeyManager.ServerKeyExchange));
Then on the client: - using
HttpChannel chan = new HttpChannel(0);
ChannelServices.RegisterChannel(chan);
MarshalByRefObject barObj =(MarshalByRefObject)
RemotingServices.Connect(typeof(BarChartInterface),
"
MarshalByRefObject lineObj = (MarshalByRefObject)
RemotingServices.Connect(typeof(LineChartInterface),
"
MarshalByRefObject authObj = (MarshalByRefObject)
RemotingServices.Connect(typeof
(RemotingChartService.SecurityInterfaces.IAuthorisation),
"
RemotingConfiguration.RegisterActivatedClientType(typeof
(RemotingChartService.SessionKeyManager.ServerKeyExchange),
"
Every time the client is closed, the server crashes. This is my first .net remoting application, infact its my first .net application. Could it be something to do with the lifetime of the CAO or the singleton, as this is not managed or is there a standard way of disconnecting from the seerver without causing server errors, any help with this would be appreciated.
Thankyou.
Richard H.