Network switching with respect to CSLA4 and Windows Phone 7

Network switching with respect to CSLA4 and Windows Phone 7

Old forum URL:

itogroup posted on Thursday, February 17, 2011

We are in the very early discussion phases of creating a mobile client for our product. We currently use CSLA for our WinForms client. We would require individuals in the field to update inventory assets and work orders in the field. We are on a large campus with many buildings (with many wi-fi access points per building, all sharing the same SSID) and some holes in wi-fi coverage, which would require us to fall back on the WWAN connection in the phone.

I don't know enough about the various architectures involved to say how reliable this would be.

My first concern is related to authentication: would switching networks require the user to re-authenticate at all? If so, could code in the client take care of the re-authentication such that it is transparent to the end user?

Additionally, what happens if the user switches from one wi-fi access point to another or from wi-fi to WWAN while an object is being sent across the wire? Hopefully this would be infrequent, as someone would most likely be standing still while updating an item. I could see a passenger pulling up a list of work orders while someone is driving, which could cause network switching.

I'd be curious to hear if anyone has any real-world or theoretical insight into these issues. Thanks in advance!

RockfordLhotka replied on Thursday, February 17, 2011

From my experience using WP7, I've never hit a network disruption when moving from home to work - so WiFi on either end and 3G in the middle while driving. However, I haven't tried walking out of my WiFi range to 3G while doing a long file download or something though...

The authn question probably depends a lot on how your app does authn. If the user logs into a web site on WiFi they can keep using it on 3G just fine, because the cookie on the client is the same one recognized by the server. The intervening network has nothing to do with it.

If you are using some cookie or token based authn model in your app you'd get the same result.

itogroup replied on Friday, February 18, 2011


As always, thanks for your brilliance! There shouldn't be any major downloads besides some small images.

We use a custom Identity and Principal in CSLA. So as long as Csla.ApplicationContext.User is set to the proper principal on the client side, everything should just work?



RockfordLhotka replied on Friday, February 18, 2011

The WP7 code uses the same ApplicationContext.User scheme as for Silverlight, and custom principal/identity objects flow to the server through the data portal the same way.

The only thing to consider with WP7 is that 3G isn't WiFi in terms of bandwidth. So you might want to suppress the passing of the principal/identity to minimize the bandwidth requirement. CSLA 4 supports that - with the idea that you'd pass just the user id through ClientContext and recreate the principal on the server with each request.

That's not a requirement - just something to consider based on your experiences with perf over the cell network.

Copyright (c) Marimer LLC