* * * * * * * * * * * *
DATE & TIME:  01/17/2007 12:55:56:25 AM
CUSTOM MSG:   Couldn't Call Proccess on Listener App.

SOURCE:       mscorlib
MSG:          Unable to find assembly 'CommonLibrary, Version=2.0.0.19, Culture=neutral, PublicKeyToken=db050eada5e4a992'.
STACK:        
Server stack trace: 
   at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
   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 abc.Technologies.AppListener.Process(AppArgs args)
   at abc.ServTech.Matrix.Client.RemotingHelpers.SendUserToCSI(String uid, Int32 browserTab) in C:\Sandbox\junxu3_devteam\serv_tech\GWA1.1\client\PhoneSupport\CommonLibrary\RemotingHelpers.cs:line 123

解决方案 »

  1.   

    public string SendUserToCSI(string uid, int browserTab)
            {
                // This is where the remote object from the listener is Marshalled.            // Notice that we include the protocol, the port, and the URI in the call.            int portNumber = 6161 + Process.GetCurrentProcess().SessionId;            this.serverForSending = (AppListener)Activator.GetObject(typeof(IAppListener), string.Format("tcp://localhost:{0}/CSIInterop", portNumber));            RemotingServices.Marshal(this.serverForSending);            // Creat the event args wrapper
                AppArgs args = new AppArgs();
                // Create the event args
                eBay.Technologies.VisualEventArgs vea = new aaa.Technologies.VisualEventArgs();
                vea.Items = new object[] { uid, browserTab };
                vea.EventName = "DisplayUser";            args.HookArgs = vea;            try
                {
                    // Try sending the event args
                    // (will fail if the listener doesn't exist)
                    this.serverForSending.Process(args);
                    return args.HookArgs.ID;
                }
                catch (Exception ex)
                {
                    Helpers.ErrorHandler(ex, "Couldn't Call Proccess on Listener App.\r\n\t");
                    throw new AppException("Couldn't Call Proccess on Listener App.", ex);
                    //return "ERROR:" + Environment.NewLine + ex.Message;
                }        }
      

  2.   

    this.serverForSending.Process(args);
    这句调用报的错。
      

  3.   

    没有把你的CommonLibrary库拷贝到主程序的目录下,引用一下得了
      

  4.   

    to zpingy(阿平)  我调用this.serverForSending.Process(args);所在的代码段就是在CommonLibrary项目中的 ,也就是remoting的client side的程序。public string SendUserToCSI(string uid, int browserTab)而,这个错误似乎是remoting的server/listener side的程序报出来的,(不能确定),但是我肯定remoting的server/listener side的程序绝对没用到CommonLibrary的引用。
    谁能告诉我,
    System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()Serialization 在何时发生的? 是在remoting调用开始时,还是remoting调用结果返回时?
      

  5.   

    我找到一片帖子,是关于这个的,但是看不太明白,那位解释解释???http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=119402