首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

Sharepoint 工作流反串行化有关问题

2012-03-11 
Sharepoint 工作流反串行化问题运行这段代码时,XmlSerializer xs new XmlSerializer(typeof(Init))XmlT

Sharepoint 工作流反串行化问题
运行这段代码时,
XmlSerializer xs = new XmlSerializer(typeof(Init)); 
XmlTextReader xtr = new XmlTextReader(new System.IO.StringReader(workflowProperties.InitiationData)); 
Init init = (Init)xs.Deserialize(xtr);

报了这个错:
System.ArgumentNullException was unhandled by user code
  Message="Value cannot be null.\r\nParameter name: s"
  Source="mscorlib"
  ParamName="s"
  StackTrace:
  at System.IO.StringReader..ctor(String s)
  at TestWorkFlow.Workflow1.onWorkflowActivated1_Invoked(Object sender, ExternalDataEventArgs e)
  at System.Workflow.ComponentModel.Activity.RaiseGenericEvent[T](DependencyProperty dependencyEvent, Object sender, T e)
  at System.Workflow.Activities.HandleExternalEventActivity.RaiseEvent(Object[] args)
  at System.Workflow.Activities.HandleExternalEventActivity.Execute(ActivityExecutionContext executionContext)
  at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
  at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
  at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
  InnerException: 


求高手指点~~

[解决办法]
workflowProperties.InitiationData的值是什么,从错误表面看这个值是null。你可以用VS调试一下看看。或者提供更详细的信息

热点排行