473,418 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 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 1413
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Henrik Nordgren | last post by:
Im trying to build a simple chat app... here is the code: server visual basic code:-------------------------------------------------------------------------------- Public Class ChatServer ...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
6
by: Catherine Jones | last post by:
Hi all, we need urgent help in a matter. We are trying to pass a COM object from the client to server and are facing some problems in the same. We've our client in C# as well as the Server...
6
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
9
by: Nak | last post by:
Hi there, I have been messing around with remoting in an attempt to create a "shared application" as mentioned in another thread by that name. I have created a singleton object just like the...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.