Re: Remoting from a control hosted in IE
From: Nicole Calinoiu (calinoiu)
Date: 10/22/04
- Previous message: dsellers: "HELP:: Assembly Reference Security"
- In reply to: mfeingold: "Remoting from a control hosted in IE"
- Next in thread: mfeingold: "Re: Remoting from a control hosted in IE"
- Reply: mfeingold: "Re: Remoting from a control hosted in IE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 22 Oct 2004 11:12:43 -0400
Asserting permissions almost certainly won't help with this, and you should
probably remove any of these test assertions that might remain in your code
since they could open your code to unnecessary risks.
Resolving the problem probably will probably require granting your code
additional permissions via CAS policy. The missing permission _might_ be
SecurityPermission.SerializationFormatter, but no guarantees there...
If you really want help with this, it might be a good idea to provide a
small example (as described at
http://www.yoda.arachsys.com/csharp/complete.html) that reproduces the
problem. There are simply too many variations on the theme of remoting for
someone else to be able to sufficient mimic your setup to reproduce the same
error without a great deal of time invested in trial and error.
HTH,
Nicole
"mfeingold" <mfeingold@discussions.microsoft.com> wrote in message
news:7C24D8CE-B3F4-45F8-95D3-7C55DAAB111E@microsoft.com...
>I have a control which connects to an object on a server. This object has
>an
> event, and client (the control) subscribes to this event. So something
> happens on the server, it fires the event - the control is notified.
> All this works just fine when the controll is hosted in a windows
> application, but I have to host it in IE.
> To make it work I asserted any permission I can think of (as a matter of
> fact I asserted unrestricted for now) but it got me only so far. The
> control
> creates the remoted object and it can subscribe to an event, but when the
> server attempts to fire the event, it blows (see the text of the message
> below in this post)
>
> It looks like I still need to assert necessary permissions somewhere else,
> but what permissions and where do I assert them - I have no clue. Any
> idea?
>
> The text of the exception:
>
> An unhandled exception of type 'System.Runtime.Remoting.RemotingException'
> occurred in mscorlib.dll
>
> Additional information: An error occurred while processing the request on
> the server: System.Security.SecurityException: Request for the permission
> of
> type System.Security.Permissions.SecurityPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
> failed.
> at System.Security.PermissionListSet.CheckDemand(CodeAccessPermission
> demand, PermissionToken permToken)
> at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
> permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
> checkFrames, Int32 unrestrictedOverride)
> at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
> cap, StackCrawlMark& stackMark, PermissionType permType)
> at System.Security.CodeAccessPermission.DemandInternal(PermissionType
> permissionType)
> at
> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object
> graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
> at
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream
> serializationStream, Object graph, Header[] headers, Boolean fCheck)
> at
> System.Runtime.Remoting.Channels.CoreChannel.SerializeBinaryMessage(IMessage
> msg, Boolean includeVersions)
> at
> System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack
> sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
> requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders,
> Stream& responseStream)
> at
> System.Runtime.Remoting.Channels.Tcp.TcpServerTransportSink.ServiceRequest(Object
> state)
> at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow()
>
>
- Previous message: dsellers: "HELP:: Assembly Reference Security"
- In reply to: mfeingold: "Remoting from a control hosted in IE"
- Next in thread: mfeingold: "Re: Remoting from a control hosted in IE"
- Reply: mfeingold: "Re: Remoting from a control hosted in IE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|