By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

Remoting: Serialization.SerializationException thrown

P: n/a
Hi,

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

"An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' 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.../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
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.