473,695 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET Mobile, Cookieless Sessions, and Load Balancing

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.FormatEx ception: Invalid length for a Base-64 char array. at
System.Convert. FromBase64Strin g(String s) at
System.Web.UI.L osFormatter.Des erialize(String input) at
System.Web.UI.M obileControls.M obilePage.LoadP ageStateFromPer sistenceMedium( )
at System.Web.UI.P age.LoadPageVie wState() at
System.Web.UI.P age.ProcessRequ estMain()

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?

Nov 19 '05 #1
2 2360
Having zilch for experience with WAP sites and the F5 load balancer,
I cannot be 100% certain that this is the issue but...

If it happens periodically it may be that the ISP that
the mobile device runs its traffic through is running
their own outgoing traffic network proxy server. In PC
based browsers, this causes the load balancer to send
the request to the wrong server in the farm. I "suspect"
that this may be occurring to some of your users.

Purely a guess on my part.

If this is, in fact, the issue, there is a product
called ScaleOut StateServer that can remedy this.

http://www.eggheadcafe.com/articles/scaleout_server.asp

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com .
http://www.eggheadcafe.com/forums/merit.asp

<th*********@gm ail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
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.FormatEx ception: Invalid length for a Base-64 char array. at
System.Convert. FromBase64Strin g(String s) at
System.Web.UI.L osFormatter.Des erialize(String input) at
System.Web.UI.M obileControls.M obilePage.LoadP ageStateFromPer sistenceMedium( )
at System.Web.UI.P age.LoadPageVie wState() at
System.Web.UI.P age.ProcessRequ estMain()

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?

Nov 19 '05 #2
It turns out that this problem probably isn't due to load balancing.
After examining the log files I've determine that it only happens with
two phones.

These phones are the Motorola 8720 andthe Samsung SGH 427M.

There may be additional phones that cause this error, but we have yet
to see them hit the site.

Any ideas?

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1644
by: djluker | last post by:
Does anyone know of a way to implement cookieless sessions in ASP.net by tacking on the session ID to the querystring, rather than setting cookieless="true" in the web.config file? I see that some websites (e.g. match.com) are using ASP.NET and are implementing cookieless sessions in this manner, yet everything I read says that the only method of implementing cookieless sessions is by setting cookieless="true" and letting ASP.net "do it's...
0
1649
by: Nikander Bruggeman | last post by:
Hi, In a situation where I have 2 servers which are load balanced I keep losing session state, although I store the session state in sql server and use a cookieless session, so that the session id is embedded in the url. In the trace log I find that the session id is sometimes empty, I assume this happens when server 2 is handling the requst, instead of the server where the session was created. Does anybody have any clue
3
3531
by: Scott | last post by:
Hello, we are having problems displaying non-aspx files (images, style sheets) since we have upgraded to the 1.1 framework when using a cookieless session (sessionID in the url). Check out our file system set up below. Now, in an aspx page, we set as the "src" of our images something like "../images/animage.jpg". If the current actual url in the browser is something like http://server/webapp/(someSessionID)/forms/form1.aspx
4
4954
by: DeeAnn | last post by:
We've encountered a "flaky" situation with a Session variable holding a data set on load balanced servers; server session with cookies is set up. Background: Session variable holds a dataset. Dataset is retrieved and updated periodically. Eventually the dataset is sent to a web service for processing.
2
1554
by: Tom Pester | last post by:
I experimented/researched cookieless sessions and tried it on my website. I expected the switch to cookieless sessions to be transparent but this isn' t the case at all: 1) Forms based authentication doesn't work I read that the Whidbey release will support this and you can make it work today: http://www.codeproject.com/aspnet/cookieless.asp Still, it's a showstopper for most websites
2
2962
by: Steve Franks | last post by:
According to the docs you tell ASP.NET to use cookieless sessions by setting a value in the config.web file. However, what if I wanted to determine at run time whether or not I wanted to use cookieless sessions for a particular user, and if so, I'd instruct ASP.NET to turn on cookieless sessions for a particular user session. Is this possible? For example I want to use cookie based sessions by default for all users. But if a user has...
10
7919
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page requests and sessions.
2
1835
by: rk325 | last post by:
I have a question about cookies & browser permissions and turning off cookies when creating a web site (cookieless mode in web.config). I have a web site that of course uses Session variables. But we decided to turn off the cookieless mode because the client specifically said her browser did not allow cookies. Anyway, when searching about it, I found out that by setting cookieless = true the session cookie is embedded into the URL sent...
0
1379
by: David H. | last post by:
Is there any way to have a user use cookieless sessions at runtime on a case-by-case basis? Or do cookieless sessions have to be turned on globally in the web.config for all users of the web application? We are attempting to set an Outlook folder to display a web page (ala Microsoft CRM 3's Outlook integration), but Outlook's implementation of the IE browser control appears to force a new session whenever you open a new browser window...
0
9004
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8864
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5842
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4592
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2288
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1986
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.