Thursday, May 17, 2007

InProc Mode issues with WebGarden & WebFarm



If you enable Web-garden mode by setting the webGarden attribute to true in the processModel element of the application's Web.config file, do not use InProc session state mode.

If you do, data loss can occur if different requests for the same session are served by different worker processes.


Reason Behind:

If a user already has a Session key, but is returned to a different machine than the one on which his session was created, a new Session is created on that new machine using the session ID supplied by the  user. Of course, that new Session is empty and unexpected results may occur.

 You cannot use InProc mode in a Web garden environment because multiple instances of Aspnet_wp.exe are running on the same computer.


Work Around: [Mentioned in Wrox]

However if regenerateExpiredSessionId is set to True in the web.config file, a new Session ID is created and assigned to the user.



Note: []

InProc is the only mode that supports the Session_End event. The Session_End event fires when a user's session times out or ends. You can write code in this event to clean up server resources.



Thanks & Regards,

Arun Manglick

SMTS || Microsoft Technology Practice || Bridgestone - Tyre Link || Persistent Systems || 3023-6258


DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

No comments:

Post a Comment