views:

136

answers:

1

Hi,

I am working on a project using the uploadify jquery plugin and CastleProject Monorail as backend. The problem I get is that while uploading it seems to block the ajax calls (which are called in the meantime). The ajax are called after the upload is finished.

The strange thing is, when I implement uploadify in a new castleproject monorail project, ajax calls that are called in the meantime DO work.

There seems to be some setting which I cannot think of at the moment in the former project that causes the blocking. Web.config settings are the same.

Does anybody have an idea what can be the cause of this?

Thanks

Update:

I think I found the problem: As soon as the Session object has been used, the webserver blocks multiple requests. This to circumvent the more general problem of race conditions.

Is there some way to disable this so I can handle the race conditions myself?

A: 

Found a solution / workaround, but it may not be applicable to every case. Thanks Mauricio Scheffer for giving directions.

Instead of using a monorail handler (i.e. a controller function) to handle the upload (or long running process), create a separate handler (ashx) outside of monorail to do your stuff.

This handler should implement the IReadOnlySessionState interface, so that it won't block multiple requests. The only catch is that in this handler you only may read from the session object and not to write to it.

Zurb