none
PermissionSet - Request Failed error RRS feed

  • Question

  • Hi,

    I have few projects communicating using ChannelSink, ServerSink and ClientSink.

    I've upgraded the projects from .NET 2.0 to .NET 4.0. Before the upgrade everything worked fine.

    Now, when I try to communicate , - for a specific message - my OnReceiveMessage isn't called and throwing the following exception:

    System.Security.SecurityException: Request failed
    
    Server stack trace:
        at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* pLengths, Int32* 
    
    pLowerBounds)
        at System.Array.CreateInstance(Type elementType, Int32 Length)
        at System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseArray(ParseRecord pr)
        at System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseObject(ParseRecord pr)
        at System.Runtime.Serialization.Formatters.Soap.ObjectReader.Parse(ParseRecord pr)
    System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren()
        at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXML()
    System.Runtime.Serialization.Formatters.Soap.ObjectReader.Run()
    System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler, ISerParser 
    
    serParser)
    System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream serializationStream, 
    
    HeaderHandler handler)
        at System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapRequestMessage(Stream 
    
    inputStream, Header[] h, Boolean bStrictBinding)
        at System.Runtime.Remoting.Chanels.SoapServerFormatterSink.ProcessMessage
    
    (IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream 
    
    requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
    
    Exception rethrown at [0]:
        at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage (IMessage reqMsg, IMessage 
    
    retMSg)
        at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
        .
        . (some of my files)
        .
    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Security.PermissionSet
    The demand was for:
    <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" />
    
    The only permitted permissions were:
    <PermissionSet class="System.Security.PermissionSet" version="1">
    <IPermission class="System.Security.Permissions.SecurityPermission", mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e version="1" Flags="SerializationFormatter" />
    </PermissionSet>
    
    The method that caused that failure was:
    System.Runtime.Remoting.Channels.ServerProcessing ProcessMessage(System.Runtime.Remoting.Channels.IServerChannelSinkStack, System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Channels.ITransportHeaders, System.IO.Stream, System.Runtime.Remoting.Messaging.IMessage ByRef, System.Runtime.Remoting.Channels.ITransportHeaders ByRef, System.IO.Stream ByRef)

    The thing is, if I create a dummy method and add it to the sinkstack - it calls it. even if I use the same proxy which denies the message.

    Other thing is, The other messages are working just fine. only one type of messages isnt working from all the types iv'e created.

    I haven't requested PermissionSet at my app at all, Any help?


    • Edited by Queex Thursday, February 20, 2014 6:25 AM
    Wednesday, February 19, 2014 5:42 PM

Answers