本文介绍了对使用CTP 5的WCF服务的并发请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Silverlight客户端,通常在同一时间对WCF服务进行一对(实际上是两次)调用。 有时我会得到关于未设置为对象实例的对象引用的有线错误。 它似乎只在
启动时发生。 如果我打电话,那么一切都很好。 就此而言,我将以下内容添加到global.asax文件中。

I have a silverlight client that makes a couple (literally TWO) calls to a WCF service, typically at the same time.  On occasion I'll get wired errors about object reference not set to an instance of an object.  It seems to be happening only on the start up.  If I stager the calls, then all is well.  For that matter if I add the following to the global.asax file all it well.


using (var context = new MyContext())
{
  context.Database.Initialize(false);
}

推荐答案

 

是的,这是CTP5中的一个错误。 
我们打算为RTM修复此问题。

Yes, this is a bug in CTP5. We intend to fix this for RTM.

 

谢谢,

Arthur


这篇关于对使用CTP 5的WCF服务的并发请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-04 05:46