Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# remoting + GAC

C# remoting + GAC

Scheduled Pinned Locked Moved C#
csharpdotnetsysadmindata-structuressecurity
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dio22
    wrote on last edited by
    #1

    I've created a remoting application that uses an assembly located in the GAC. When I try to run a client application that grabs the remote object and uses an object in the GAC assembly I get an exception. Everything works fine if the assembly is not signed. Thanks for any help. System.Runtime.Serialization.SerializationException was unhandled Message="Because of security restrictions, the type PLCLib.PLCMediator+PLCConnection cannot be accessed." Source="mscorlib" StackTrace: Server stack trace: at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel) at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.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) at PLCLib.PLCMediator.WriteBit(PLCConnection connection, String dataAddress, Boolean dataIn) at PLCDriverConsole.WriteBit.WriteBits(PLCConnection connection, String dataAddress, Boolean dataIn) in C:\Brad\PLCDriverConsole\PLCDriverConsole

    K 1 Reply Last reply
    0
    • D Dio22

      I've created a remoting application that uses an assembly located in the GAC. When I try to run a client application that grabs the remote object and uses an object in the GAC assembly I get an exception. Everything works fine if the assembly is not signed. Thanks for any help. System.Runtime.Serialization.SerializationException was unhandled Message="Because of security restrictions, the type PLCLib.PLCMediator+PLCConnection cannot be accessed." Source="mscorlib" StackTrace: Server stack trace: at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord pr) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum) at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel) at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.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) at PLCLib.PLCMediator.WriteBit(PLCConnection connection, String dataAddress, Boolean dataIn) at PLCDriverConsole.WriteBit.WriteBits(PLCConnection connection, String dataAddress, Boolean dataIn) in C:\Brad\PLCDriverConsole\PLCDriverConsole

      K Offline
      K Offline
      KaptinKrunch
      wrote on last edited by
      #2

      Dio22 wrote:

      "Because of security restrictions, the type PLCLib.PLCMediator+PLCConnection cannot be accessed."

      Your problem is noted right there for you.

      Just because we can; does not mean we should.

      D 1 Reply Last reply
      0
      • K KaptinKrunch

        Dio22 wrote:

        "Because of security restrictions, the type PLCLib.PLCMediator+PLCConnection cannot be accessed."

        Your problem is noted right there for you.

        Just because we can; does not mean we should.

        D Offline
        D Offline
        Dio22
        wrote on last edited by
        #3

        Thank you Kaptin obvious. What's causing the security exception? I need help fixing the problem, not identifying it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups