473,729 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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. SerializationEx ception' 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" ?>
<configuratio n>
<system.runtime .remoting>
<application>
<service>
<wellknown
mode="Singleton "
type="SI_Remoti ng.RemoteMessag e, SI_Remoting"
objectUri="Remo teServer.soap"
/>
</service>
<channels>
<channel
ref="http"
port="33445"
/>
<serverProvider s>
<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" ?>
<configuratio n>
<system.runtime .remoting>
<application>
<client>
<wellknown
type="SI_Remoti ng.RemoteMessag e, SI_Remoting"
url="http://localhost:33445/RemoteServer.so ap"
/>
</client>
<channels>
<channel
ref="http"
port="0"
/>
<serverProvider s>
<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 "serverProvider s" tags to
"clientProvider s" (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 1427
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.co m

"Skip" <Sk**@discussio ns.microsoft.co m> wrote in message
news:CD******** *************** ***********@mic rosoft.com...
Hi,

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

"An unhandled exception of type
'System.Runtime .Serialization. SerializationEx ception' 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" ?>
<configuratio n>
<system.runtime .remoting>
<application>
<service>
<wellknown
mode="Singleton "
type="SI_Remoti ng.RemoteMessag e, SI_Remoting"
objectUri="Remo teServer.soap"
/>
</service>
<channels>
<channel
ref="http"
port="33445"
/>
<serverProvider s>
<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" ?>
<configuratio n>
<system.runtime .remoting>
<application>
<client>
<wellknown
type="SI_Remoti ng.RemoteMessag e, SI_Remoting"
url="http://localhost:33445/RemoteServer.so ap"
/>
</client>
<channels>
<channel
ref="http"
port="0"
/>
<serverProvider s>
<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 "serverProvider s" tags to
"clientProvider s" (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
1487
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 Public Sub New()
0
1906
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 Remoting and possible others. Keywords: VSS Remote Access, VSS Web Access, VSS Internet Access,
5
5687
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 http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere 4.0, SourceOffSite 4.1, VSS Connect 1.5, SourceXT 2.1, VSS Remoting 2.5,
0
3292
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 comparison among SourceAnyWhere, SourceOffSite, VSS Remoting and possible others.
6
2798
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 in C# and we're using remoting for client to server communication.
6
2715
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 rmi. Just to keep my question short I am posting trimmed version of my code. //file: Serializable.cs
0
1420
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 Remoting and possible others. Keywords: VSS Remote Access, VSS Web Access, VSS Internet Access,
9
2100
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 example in the 101 VB.NET examples. It works great, only 1 instance ever gets created and is shared by each client. I have a few questions though, * Can the singleton contain events? In such a way that when the
2
3058
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 / Server activated mode on startup. The Remoting Client accesses the Remoting Class through the interface of the Class and subscribes to an event of the Remoting Class that will be fired upon the private member value change.
0
9280
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6016
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2162
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.