Remoting from a control hosted in IE

From: mfeingold (mfeingold_at_discussions.microsoft.com)
Date: 10/21/04


Date: Wed, 20 Oct 2004 20:23:05 -0700

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()



Relevant Pages

  • Re: Access Is Denied...
    ... To ensure it is not permissions, the everyone group has full control. ... > has enough access permission on your new server. ... >> a true permission denied error which should be logged?). ... >> James Goodman ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Forcing Ownership of files
    ... >> without that right IF they have Full Control. ... > have explicit permission to do whatever they like with the content of ... > when I first tuned up here from a Novell server to a Windows 2000 server ... Now they are worried about security so ...
    (microsoft.public.win2000.active_directory)
  • Re: ISA Server Error
    ... from NETWORK SERVICE to Local Server for the logon. ... The default permission should be ... Administrators: Full Control ... make a rule change or anything. ...
    (microsoft.public.isa)
  • Re: Any reason I would not be able to pass an IPrincipal object?
    ... It is running as a SharePoint Web Part which is basically a .Net Server ... > not permit Principal Control? ... >> System.Security.SecurityException: Request failed. ... >> obj, SerializationInfo info, StreamingContext context) at ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Handling Slow Loading User Controls
    ... the server can not send more info after the request is done. ... not render until it has enough of the html to render (if complex it may wait ... use iframes - each control is hosted by an iframe, ...
    (microsoft.public.dotnet.framework.aspnet)