I'm writing a silverlight application that resembles a shopping cart system. This app can only be launched from the asp.net website after the user is logged in to the site.
Upon first load, the app will send a request to the backend through WCF service to retreive all the existing items in the shopping cart.
Therefore the silverlight app needs to know who the current user is, to find which shopping cart to load.
I found there are a couple of ways so far, but not happy with any of them:
- using wcf aspnet compat. silverlight can ask who the current user is by asking the wcf service.
- pass parameters from the page to xaml by using xaml.InitParameters and pass in the minimum amount of information to identify a user in a serialized format.
- pass parameters through query string to xaml (apparently this is also possible)
Can anyone share the best practice to achieve this? Thanks