HighTechTalks DotNet Forums  

Registering sponsor returns a security restriction exception

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss Registering sponsor returns a security restriction exception in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
ALI-R
 
Posts: n/a

Default Registering sponsor returns a security restriction exception - 12-02-2004 , 06:33 PM






I am trying to resgiter a sponsor for a singleton remote object but I get
the following Exception.I have gone through many postings but they are all
ablt CAO ,,not singleton.

***Error:
Because of security restrictions, the type System.Runtime.Remoting.ObjRef
cannot be accessed
*******


***Client-Config
<configuration>
<system.runtime.remoting>
<application name="ListClient">
<client>
<wellknown type="ListServer.CompanyList, ListServer"
url="tcp://magid1017:9000/CompanyList"/>
<wellknown type="ListServer.Count, ListServer"
url="tcp://magid1017:9000/Count"/>
</client>
<channels>
<channel ref="tcp" port="9002"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>

***Server Config
<configuration>
<system.runtime.remoting>
<customErrors mode="off"/>
<application name="ListServer">
<service>
<wellknown mode="Singleton" type=
"ListServer.CompanyList,ListServer" objectUri="CompanyList"/>
<wellknown mode="Singleton" type=
"ListServer.Count,ListServer" objectUri="Count"/>
</service>
<channels>
<channel ref="tcp" port="9000"/>
</channels>
</application>
<debug loadTypes="true" />
</system.runtime.remoting>

***Client Code
mLease = (ILease)RemotingServices.GetLifetimeService(objCou nt);
mSponsor = new ClientSponsor();
mSponsor.RenewalTime = TimeSpan.FromSeconds(15);
mLease.Register(mSponsor);


Thanks for your help




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.