Does the SessionState attribute in MVC 3 work properly?

I'm managing a rather large project, written in asp.net webforms + mvc3, with a large user base, and a pretty high daily visitor count. Basically, there are a lot of requests at any given moment.

One of my controllers in MVC that handles / resizes images on the fly has the following attribute applied to it:

[SessionState(SessionStateBehavior.Disabled)]

Now, if an action in the controller tries to access the session - it obviously throws an exception - so we're good so far.

The problem is: if I go to the IIS Worker Processes window (Win Server 2008 R2, IIS 7.5), and check the current requests for this site, I can sometimes see the requests to an action in this controller. Their current state is locked in State: RequestAcquireState, Module Name: Session. Sometimes these locks go over a second or two in this state.

Wasn't the whole point of the attribute in the first place to make the requests to the controller ignore the state, and not waste time (and possibly being locked) trying to acquire the state?

If this is so - am I doing something wrong here, or does the problem lie elsewhere?

7
задан Artiom Chilaru 11 February 2011 в 16:39
поделиться