Re: Problems with CAS and remote objects
From: Allen Anderson (allen_at_sparkysystems.com)
Date: 03/19/04
- Next message: Allen Anderson: "Re: Questions about Remoting, objects, threading. lease lifetime and object cleanup, and a couple of others."
- Previous message: Allen Anderson: "Re: Windows Service"
- In reply to: Roy Chastain: "Problems with CAS and remote objects"
- Next in thread: Roy Chastain: "Re: Problems with CAS and remote objects"
- Reply: Roy Chastain: "Re: Problems with CAS and remote objects"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 13:24:32 -0700
have you set the typeFilterLevel to full on each side?
Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com
On Fri, 19 Mar 2004 14:18:50 -0500, Roy Chastain
<NOSPAMroy@kmsys.com.NOSpam> wrote:
>I am receiving an Exception of
>Request for the permission of type System.Security.Permissions.SecurityPermission
>
>I have the following setup
>
>I am sitting at DeskTop1 (DT1).
>There is a server called Server1.
>
>On Server1
>inetpub\wwwroot\vd1 contains an .exe and several .dlls
>inetpub\wwwroot\vd2\bin contains more dlls which comprise the remotable objects and other assemblies that they require
>
>On DT1 I enter the following into Internet Explorer
>http://server1/vd1/program.exe
>
>This works.
>This program calls methods of a remote object that is contained in an assembly (RO1) in vd2/bin. This works for most of the
>methods.
>The method that is causing me problems returns an array of serializable objects that are created in a managed C++ assembly that is
>also in vd2/bin. Lets call it MC1.
>
>I have debuged the code in MC1 with remote debugging. The last line of the method in question is
>return arrayofobjects;
>At that point I have an array of length 2 that has the correct 2 objects in it.
>
>The Program.exe that is running on DT1 receives the security exception.
>This is the middle of the stack trace
>mscorlib.dll!System.Security.PermissionListSet.CheckDemand(System.Security.CodeAccessPermission demand,
> System.Security.PermissionToken permToken) + 0x2f bytes
>mscorlib.dll!System.Security.CodeAccessSecurityEngine.Check(System.Security.CodeAccessPermission cap,
> System.Threading.StackCrawlMark stackMark) + 0x59 bytes
>mscorlib.dll!System.Security.CodeAccessPermission.Demand() + 0x3f bytes
>
>system.runtime.serialization.formatters.soap.dll!System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(System.Runtime.Remoting.Messaging.HeaderHandler
> handler = {System.Runtime.Remoting.Messaging.HeaderHandler}, System.Runtime.Serialization.Formatters.Soap.ISerParser serParser
> = {System.Runtime.Serialization.Formatters.Soap.SoapParser}) + 0xac bytes
>system.runtime.serialization.formatters.soap.dll!System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(System.IO.Stream
> SerializationStream = {System.Runtime.Remoting.Channels.ChunkedMemoryStream}, System.Runtime.Remoting.Messaging.HeaderHandler
> handler = {System.Runtime.Remoting.Messaging.HeaderHandler}) + 0x15c bytes
>system.runtime.remoting.dll!System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapResponseMessage(System.IO.Stream
> inputStream = {System.Runtime.Remoting.Channels.ChunkedMemoryStream}, System.Runtime.Remoting.Messaging.IMessage requestMsg =
> {System.Runtime.Remoting.Messaging.MethodCall}, System.Runtime.Remoting.Messaging.Header[] h = {Length=0x3},
> bool bStrictBinding = false) + 0x8b bytes
>system.runtime.remoting.dll!System.Runtime.Remoting.Channels.SoapClientFormatterSink.DeserializeMessage(System.Runtime.Remoting.Messaging.IMethodCallMessage
> mcm = {System.Runtime.Remoting.Messaging.MethodCall}, System.Runtime.Remoting.Channels.ITransportHeaders headers =
> {System.Runtime.Remoting.Channels.TransportHeaders}, System.IO.Stream stream
> ={System.Runtime.Remoting.Channels.ChunkedMemoryStream}) + 0x1c6 bytes
>system.runtime.remoting.dll!System.Runtime.Remoting.Channels.SoapClientFormatterSink.AsyncProcessResponse(System.Runtime.Remoting.Channels.IClientResponseChannelSinkStack
> sinkStack = {System.Runtime.Remoting.Channels.ClientChannelSinkStack}, System.Object state =
> {System.Runtime.Remoting.Messaging.MethodCall}, System.Runtime.Remoting.Channels.ITransportHeaders headers =
> {System.Runtime.Remoting.Channels.TransportHeaders}, System.IO.Stream stream =
> {System.Runtime.Remoting.Channels.ChunkedMemoryStream}) + 0x38 bytes
>mscorlib.dll!System.Runtime.Remoting.Channels.ClientChannelSinkStack.AsyncProcessResponse(System.Runtime.Remoting.Channels.ITransportHeaders
> headers, System.IO.Stream stream) + 0x4e bytes
>
>All assemblies are stronly named.
>On DT1 all assemblies signed with our key (which these are) have been given Full Trust.
>The procedure that Hernan gave me shows 'unrestricted' for the .exe
>
>Just for grins I put all the assemblies in vd2/bin on Server1 into the GAC on Server1. This did not change anything.
>
>I also have an Assert in the code in vd2/bin before the call to the MC1 dll to assert unmanaged code.
>public DSWebServer[] ListAvailableIISServers ()
>{
> DSWebService service_info;
> DSWebServer[] servers;
> SecurityPermission sp;
>
> sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
> try
> {
> sp.Assert();
> service_info = new DSWebService(null);
> servers = service_info.WebServers;
> }
> catch (Exception e)
> {
> servers = null;
> }
> return servers;
>}
>
>Thanks
>-------------------------------------------
>Roy Chastain
>KMSystems, Inc.
- Next message: Allen Anderson: "Re: Questions about Remoting, objects, threading. lease lifetime and object cleanup, and a couple of others."
- Previous message: Allen Anderson: "Re: Windows Service"
- In reply to: Roy Chastain: "Problems with CAS and remote objects"
- Next in thread: Roy Chastain: "Re: Problems with CAS and remote objects"
- Reply: Roy Chastain: "Re: Problems with CAS and remote objects"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|