Remoting: Serialization.SerializationException thrown

G

Guest

Hi,

I get the following exception thrown when I try to run my code:

"An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll

Additional information: Because of security restrictions, the type
System.Runtime.Remoting.ObjRef cannot be accessed."

Now, I did read an MS article (located
here:http://blogs.msdn.com/sanpil/archive/2004/02/23/78754.aspx) and I have
tried to implement the changes needed in my configuration files but to no
avail. I still get the same message.

Here's a copy of my server side config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode="Singleton"
type="SI_Remoting.RemoteMessage, SI_Remoting"
objectUri="RemoteServer.soap"
/>
</service>
<channels>
<channel
ref="http"
port="33445"
/>
<serverProviders>
<provider ref="wsdl"/>
<formatter
ref="soap"
typeFilterLevel="Full"
/>
<formatter
ref="binary"
typeFilterLevel="Full"
/>
</serverProviders>
</channels>
</application>
</system.runtime.remoting>
</configuration>

And here's a copy of the client's config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown
type="SI_Remoting.RemoteMessage, SI_Remoting"
url="http://localhost:33445/RemoteServer.soap"
/>
</client>
<channels>
<channel
ref="http"
port="0"
/>
<serverProviders>
<provider ref="wsdl"/>
<formatter
ref="soap"
typeFilterLevel="Full"
/>
<formatter
ref="binary"
typeFilterLevel="Full"
/>
</serverProviders>
</channels>
</application>
</system.runtime.remoting>
</configuration>

By the way, I also tried switching the "serverProviders" tags to
"clientProviders" (every combination for the client/server was tried) without
any success.

The code, otherwise, is pretty simple. Only thing is that I'm passing a
reference of the client to the server object in order to later on be able to
call one of it's procedures when some work has been done. You can look at my
previous post (on oct. 7th 2004) for details on the code.

Everything was done according to what's written in the article. Why am I
still getting this exception? By the way, the application is running both
the server and the client on the same machine for now so it shouldn't have
anything to do with the network.

Thanks,

SC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top