开发者

LINQ-to-SQL retrieving data from a different query!

I have a web application that uses LINQ-to-SQL. It has a very strange issue, where a LINQ command retrieves the data that is supposed to be returned by another, totally different query that runs in a different thread. What could be the cause of this?

Specifically, a user accesses the application from his machine, opening a certain page. At the same time, another user accesses a different page from his (different) machine. One of the queries throws an exception, while the other returns the data of the first one, which comes from a very different table!

The case is always reproducible,开发者_JAVA百科 whenever we stress the application with these two users. I've checked but I don't see any shared variables of any kind. What else could the problem be? What should I be looking for?

Your help is really appreciated.


Sounds like a connection is being reused. Make sure not to cache those and always create and release them properly, such as in this sample.


You sure this isn't a session issue rather than a linq issue? Data requested from one asp.net session but passed over to another sounds like something's getting mixed up there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜