472,125 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

.Net Remoting impass. Please help!

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
1 1342
Skip,

Check out the section of the C# faq titled "How can I subscribe to
events exposed by a remoted object?", located at (watch for line wrap):

http://blogs.msdn.com/csharpfaq/arch...28/122691.aspx

There is an explanation of how to get events to fire over remoting, as
well as links to samples.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Skip" <Sk**@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
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 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Henrik Nordgren | last post: by
6 posts views Thread by Catherine Jones | last post: by
6 posts views Thread by Uttam | last post: by
9 posts views Thread by Nak | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.