Remoting...Because of security restrictions, the type System.Runtime.Remoting.ObjRef cannot be accessed.
- From: "Junoti" <tungacta@xxxxxxxxxxx>
- Date: 12 Dec 2006 06:30:29 -0800
Hello, I posted this out to the c# newsgroup, but I haven't received a
reply in a couple of days, so I'm posting to this group (which I
probably should have done to begin with.)
I've read several posts out there that state that setting
typeFilterLevel="Full" on the client and/or server will correct this
issue, however I'm still unable to get around it. I can successfully
create the object, and set properties that have primitive types, but
when I go to set a property that is an instance of another remote
object, the above error is thrown. Is there something special I need to
do in order to be able to set properties to business object types? I'm
using .Net 2.0, hosted in IIS.
Here's a sample of what I'm trying to do:
ITemplate template = (ITemplate)[Create proxy method using
Activator.GetObject];
IGoal goal = (IGoal)[Create proxy method using Activator.GetObject];
template.NumOfDays = 3; //works fine typeof = byte
template.NumOfWeeks = 2; //works fine typeof = byte
template.Goal = goal; //blows up with error
My server config files looks similar to the following:
<system.runtime.remoting>
<application>
<service>
<wellknown
mode="SingleCall"
type="[type], [assembly]"
objectUri="[uri].rem"
/>
</service>
<channels>
<channel ref="http"/>
<serverProviders>
<formatter ref="binary"
typeFilterLevel="Full"/>
</serverProviders>
</channels>
</application>
</system.runtime.remoting>
My client config looks like:
<system.runtime.remoting>
<application>
<client>
<wellknown type="[Type], [Assembly]"
url="http://localhost/remoting/[objectUri]"
/>
</client>
<channels>
<channel ref="http" port="0">
<clientProviders>
<formatter ref="binary"
typeFilterLevel="Full"/>
</clientProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
Thanks for any help that is provided!
.
- Follow-Ups:
- Prev by Date: HTTPChannel and HTTP.SYS
- Next by Date: Re: .NET Remoting, Windows Service host, load balancing
- Previous by thread: HTTPChannel and HTTP.SYS
- Next by thread: Re: Remoting...Because of security restrictions, the type System.Runtime.Remoting.ObjRef cannot be accessed.
- Index(es):
Relevant Pages
|
Loading