ASP.NET Mobile, Cookieless Sessions, and Load Balancing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a WAP site powered by ASP.NET Mobile controls. We're using
cookieless sessions and have an F5 Load Balancer that balances the load
between two web servers.

Every once in a while we'll get the following exception:

System.FormatException: Invalid length for a Base-64 char array. at
System.Convert.FromBase64String(String s) at
System.Web.UI.LosFormatter.Deserialize(String input) at
System.Web.UI.MobileControls.MobilePage.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadPageViewState() at
System.Web.UI.Page.ProcessRequestMain()

We've configured our F5 to route all traffic to the same machine based
on the session ID in the URL. But what about the first request to the
site?

I suspect what's happening is this. The user's phone loads up the site
and the URL they load has no session ID in it because its the first
request. Any subsequent traffic has a session ID and so the F5 will
always send that traffic to the same machine.

But that machine isn't necessarily the same machine that issued the
original session ID! Since the first request was essentially routed
randomly to one of the two web servers, the F5 won't know to route
additional requests back to that same server since there was no session
ID in the first URL the user requested.

Does anybody agree with this assesment? Any suggestions on how to fix
it?

.



Relevant Pages

  • Re: Page load frequency
    ... This way i want to protect the DB from being queried rediculously ... Of course this check will slow down each request to the page a little, ... but if the load of running the whole page is much higher, ... first question: Session. ...
    (comp.lang.php)
  • Re: Apples customer service sucks!
    ... have a load balancer distribute requests between them. ... break foo.php on server 2 until I've updated it as well. ... BBEdit. ... balancer supports session affinity or that you're storing all ...
    (comp.sys.mac.advocacy)
  • Re: Using Perl to find what address bar says
    ... I'm hoping there's a way to do it in Perl. ... Now, load this normally in your browser, then load it again using ... Doing a side-by-side comparison, you'll see several discrepancies. ... so, I can simply load a session variable on one page, then ...
    (comp.lang.perl.misc)
  • Re: Page load frequency
    ... This way i want to protect the DB from being queried rediculously ... little, but if the load of running the whole page is much higher, ... first question: Session. ... a sessionid with each request and response. ...
    (comp.lang.php)
  • Re: Dynamically adding in User Controls
    ... This would allow me to load or not load depending on values in my session ... that the UserControl is part of the ... Control headerControl = Page.LoadControl; ...
    (microsoft.public.dotnet.languages.csharp)