I getting the following error when I try to connect to my server app using remoting:
A problem seems to have occured whilst connecting to the remote server:
Server encountered an internal error. For more information, turn off customErrors in the server's .config file.
This is the code on my server app:
TcpChannel tcpChannel = new TcpChannel(999);
MyRemoteObject remObj = new MyRemoteObject (this);
RemotingServices.Marshal(remObj, "MyUri");
ChannelServices.RegisterChannel(tcpChannel);
It seems to work the first time, but unless the server app is restarted the error occurs.
I would guess something isn't being cleaned up properly but I'm not sure what as the customError is still on.
Any ideas where I start. Thanks.
[EDIT] - Thanks to Gulzar, I modified my code above to the following and now the errors are shown:
RemotingConfiguration.CustomErrorsMode = CustomErrorsModes.Off;
TcpChannel tcpChannel = new TcpChannel(999);
MyRemoteObject remObj = new MyRemoteObject (this);
RemotingServices.Marshal(remObj, "MyUri");
ChannelServices.RegisterChannel(tcpChannel);