HTTP Module + Web Farm == Session jumping from server to server? RRS feed

  • Question

  • User961107754 posted
    Let me first admit I am very green when it comes to HTTP Modules, I inherited this one from a co-worker and am just doing my best :-) I am having issues with my sessions and am looking for feedback as to where to look for problems. The Hardware: - Three Win2K SP4 boxes running IIS - BigIP for load balancing and to keep a "sticky session". What I am doing: I am using an HTTP Module to generate the appropriate header for our intranet, it also creates a user specific "tempdocs" folder on the webserver and fishes through ADSI and BrowserHawk and writes a "user.xml" file to the users tempdocs folder containing information about the user and his requests. I am also dabbling with role based security during the application_authenticaterequest. The Problem: In my ASP.NET application, when using the HTTPModule, my requests and sessions are jumping from server to server. I will watch my initial request write my "session folder" to tempdocs on one server, I can hit F5 to refresh or navigate to another page in the site and the tempdocs/session jump to another server. When the session/requests move to another one of our servers, I will loose all session variables and get all sorts of exceptions being thrown. I am currently trying to use InProc session state as I should have a "sticky session" where a user stays on a specific server. Potential Causes I Deem NOT to be the Cause: * BigIP - Easiest culprit. However classic ASP and ASP.NET sessions not using my HTTPModule are not shifting from server to server. * Application Path in Metabase - Having non-idential paths in the IIS metabase on a farm will cause something similar, but I checked using MetaEdit and all are identical in spelling and case. * Http Module not implimenting IRequiresSessionState - Can cause issues but alas we are implimenting this correctly in our module. * Some portion of my HTTP Modules code causing it - After remarking out portions, and nearly all code in the module it still shifts from server to server. Leaves me to believe it's not a specific portion of code causing the issue. * Using an HTTP Module itself - Doesn't seem like the case since there are not others complaining of the same situation. Potential Causes that could be the cause?: * SessionState shouldn't be InProc - I am not sure what the preferred SessionState is for Web Farm HTTP Modules. * Need help in identifying more issues.....??? Any help appreciated. If you need more information/clarifications please just respond... I'm at a loss as to what is causing my issues. Thanks for your help in advance, Nick Sullivan
    Wednesday, March 2, 2005 2:45 PM

All replies

  • User371668647 posted
    I'm not sure what's causing the behavior that you're seeing, but one solution would be to store your xml file on a common file storage area (like a shared folder on an Application server). This way all of the web servers would be storing and looking for the user files in a common location. So, it wouldn't be a problem if the session bounced from server to server.
    Saturday, March 19, 2005 11:16 PM