本文介绍了SerializationException未处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用远程处理来获取身份验证票据,这是一个上传到CallContext的简单classe,我的课程如下所示[Serializable]
public class MyAuthenticationTicket:ILogicalThreadAffinative
{
string m_login ="" ;;
string m_role ="" ;;
int int m_sid = 0;


am using remoting to obtain an authentication ticket a simple classe that is uploaded to the CallContext
my class is the following
 [Serializable]
 public class MyAuthenticationTicket : ILogicalThreadAffinative
 {
  string m_login = "";
  string m_role = "";
  int m_sid = 0;


public PCAuthenticationTicket(int sid,string login)
{
this this.m_login = login;
this this.m_sid = sid;
}

         
  public PCAuthenticationTicket(int sid, string login)
  {
   this.m_login = login;
   this.m_sid = sid;
  }

public PCAuthenticationTicket(int sid,string login,string role)
{
this.m_sid = sid;
this this.m_login = login;
this。 m_role = role;
}

  public PCAuthenticationTicket(int sid, string login, string role)
  {
   this.m_sid = sid;
   this.m_login = login;
   this.m_role = role;
  }

public PCAuthenticationTicket()
{
}

公共字符串登录
{
得到{return this.m_login; } set {this.m_login = value; }

  public PCAuthenticationTicket()
  {
  }
 
  public string Login
  {
   get { return this.m_login; }
   set { this.m_login = value; }
  }

public int SID
{
get get {return this.m_sid; } set {this.m_sid = value; }

  public int SID
  {
   get { return this.m_sid; }
   set { this.m_sid = value; }
  }

public string Role
{
get {return this.m_role; } set {this.m_role = value;当请求到达客户端时我有这个例外由于序列化异常未处理,因此成员MyNameSpace.MyAuthenticationtickets未解析类型

System.Runtime.Serialization.SerializationException未处理
消息="类型未解析成员'ILS.PrintControl.Common.PCAuthenticationTicket,ILS.PrintControl.Common,Version = 3.0。 3.4,Culture = neutral,PublicKeyToken = null'。"
来源=" WebDev.WebHost"
StackTrace:
在Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback)回调,对象状态)
在System.Threading._ThreadPoolWaitCall back.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
在System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(对象状态)
InnerException:

任何身体可以帮助我吗?

  public string Role
  {
   get { return this.m_role; }
   set { this.m_role = value; }
  }
 }
 when the request arrive to the client
i have this exception
SerializationException was unhandled
type is not resolved for member MyNameSpace.MyAuthenticationtickets

System.Runtime.Serialization.SerializationException was unhandled
  Message="Type is not resolved for member 'ILS.PrintControl.Common.PCAuthenticationTicket,ILS.PrintControl.Common, Version=3.0.3.4, Culture=neutral, PublicKeyToken=null'."
  Source="WebDev.WebHost"
  StackTrace:
       at Microsoft.VisualStudio.WebHost.Host.ProcessRequest(Connection conn)
       at Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(Object acceptedSocket)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
  InnerException:

Can any body help me?

推荐答案


这篇关于SerializationException未处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 01:48
查看更多