Sunny
7/21/2004 6:01:00 PM
You have to set it both at the server and at the client.
Also, you have to set customErrors = off for the server to really see
what is the exception.
customErrors can be set only in a config files. Ahh, well there is an
ugly hack to do it programmatically, but I do not recommend to do this.
So, create a simple text file with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<customErrors mode="off"/>
</system.runtime.remoting>
</configuration>
Place this file in your server directory and after you register the
channels in your server code, invoke:
RemotingConfiguration.Configure("myfile.xml");
This will enable exceptions to be rethrown to the client.
Sunny
In article <ueLpgp0bEHA.2352@TK2MSFTNGP09.phx.gbl>,
adam.snider@comcast.net says...
> Well, added in the following code and I still got the same error:
>
> Dim serverProv = New BinaryServerFormatterSinkProvider
> serverProv.TypeFilterLevel = TypeFilterLevel.Full
> Dim clientProvider = New BinaryClientFormatterSinkProvider
>
> Dim prop As IDictionary = New Hashtable(3)
> prop("name") = "Remoting"
> prop("port") = 10000
> prop("machineName") = "192.168.1.102"
> Dim channel As New TcpChannel(prop, clientProvider, serverProv)
> ChannelServices.RegisterChannel(channel)
>
> This is the error message....
>
> An unhandled exception of type 'System.Runtime.Remoting.RemotingException'
> occurred in mscorlib.dll
> Additional information: Server encountered an internal error. For more
> information, turn on customErrors in the server's .config file.
>
> Thanks,
> Adam
>
>
> "Sunny" <sunny@newsgroups.nospam> wrote in message
> news:OUibcW0bEHA.556@tk2msftngp13.phx.gbl...
> > In article <OJXESP0bEHA.2812@tk2msftngp13.phx.gbl>,
> > adam.snider@comcast.net says...
> > > Sunny,
> > >
> > > Thank you very much for all your help. I went ahead and removed shared
> from
> > > all the functions in my database class library, but I got an error when
> I
> > > ran the code:
> > >
> > > An unhandled exception of type
> 'System.Runtime.Remoting.RemotingException'
> > > occurred in mscorlib.dll
> > >
> > > Did you see anything else that might have caused this?
> > >
> > > Thanks,
> > > Adam
> > >
> >
> > Yes, you have to set typeFilterLevel = Full.
> >
> > Read my replay to Harry's post "Remoting and security limit
> > problem,help", posted on 8/20.
> >
> > Sunny
>
>
>