views:

19

answers:

1

HI
Let me explain about my problem:

I have a Silver-Light application developed base on Prism. In This app we need to use User/Password (Authenticate Our user`s) for separating permission levels. So for Doing this We wrote method in Service App (WCF web service) for detecting user and if User is valid-one, user can use App. After that(Detecting method) as Result method return valid user.

For using this User-Information we need define Global User-variable, and any Modules can access to this variable. But there is another big problem. We must define User-variable Per Session (any User work with his\her user-variable). Also in any calls from modules the new session will be create.

So how define global variable with these terms ?

A: 

Store it in a static variable on the client side. After passing it pack set it to a static variable in a class, lets say User, and then from anywhere you can User.CurrentUser and have access to that object. You shouldn't have any session issues as long as you do everything on the client side.

Stephan