Re: .Net Remoting impass. Please help!
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/15/04
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Sound"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: Page_Load not getting called?"
- In reply to: Skip: ".Net Remoting impass. Please help!"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 15 Oct 2004 10:47:13 -0400
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/archive/2004/04/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]
- mvp@spam.guard.caspershouse.com
"Skip" <Skip@discussions.microsoft.com> wrote in message
news:CDB83780-0CC2-4391-B43D-071B400B1C5A@microsoft.com...
> 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
>
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Sound"
- Previous message: Ignacio Machin \( .NET/ C# MVP \): "Re: Page_Load not getting called?"
- In reply to: Skip: ".Net Remoting impass. Please help!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|