Jan 25, 2006

ASP.NET 2.0 exposing "thread unsafe" code

Having recently upgraded our application from ASP.NET 1.1 to ASP.NET 2.0 we were conducting some multiuser test scenarios and discovered a number of problems in our application with data readers not being closed or transactions being completed, etc.

These problems all related to threading conflicts and the lack of thread safe code in our data layer. It didn't take too long for us to fix these problems, but it raised the question as to why ASP.NET 2.0 exposed the issues but they didn't seem to appear under .NET 1.1.

I still haven't gotten to the bottom of it, but I can only assume that some of the performance improvements in the ASP 2 runtime relate to vastly improved threading and that due to this we are more likely to see threads conflicts appearing.

I wonder if this is something other people have encountered, or if I'm just an isolated case?

4 comments:

  1. you can always roll back to 1.1

    ReplyDelete
  2. You're a genius! Rolling back is usually the best option for such a predicament. Then all you have to do is merge your changes since you upgraded!

    ReplyDelete
  3. "Then all you have to do is merge your changes since you upgraded!"... This is true, but it is best achieved outside of work hours (usually a weekend)

    ReplyDelete