开发者

How to keep login state in silverlight

How to keep login state in silverlight. Like we store info开发者_Python百科rmation in Cookies in ASP.net Application.


A Silverlight application runs in the client browser and is tied to this specific user. So you can keep this information wherever you like: static fields, helper classes, singletons, ... without risking to mix with other users.


You didn't state whether you mean keep login state transiently, or across restarts of the Silverlight application.

If the former, you can just store it in a variable. The Silverlight process runs on the client machine and thus has a one-to-one relationship with that user.

If the latter, you could consider storing a token in isolated storage. When the application starts, you can check for the presence of this token and pass it to the server if found.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜