-2

I have been Looking into a weird issue Recently, looking for some answers

In an Asp.Net 4.0 Web Application, i have a method which accepts object as an input parameter, Now i am Running a Load Test on the Below code with 10 Users, While I do so I get the if condition satisfied in few cases which should not be so. Which mean my data from different users mixes up leading to undesirable results. This is in My Local Machine and Hosted server - both are virtual Machines.

Private SampleClass b 
Public void DoWork(int a,SampleClass obj)
{
try
{
b=obj;
if(b.id  !=obj.id)
{
 throw new Exception("Error");
}
}
catch(Exception ex)
{
}
}

Kindly Help me Here...

4

1 回答 1

0

我刚刚想通了...... Do work 方法被一个静态实例调用,然后在内部 Do work 使用 Nhibernate 来保存数据...... Nhibernate 如何在错误/某些场景中混合这些数据

现在用新的实例对象替换静态,似乎解决了这个问题。

感谢大家

于 2013-06-04T06:07:51.653 回答