Windows Phone 7的Silverlight中使用会话 [英] Windows Phone 7 Silverlight using session

查看:141
本文介绍了Windows Phone 7的Silverlight中使用会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个Windows 7的移动Silverlight项目。我使用REST API进行身份验证使用类说的验证即可。我得到一个身份验证令牌作为响应,我把它分配给类属性的的authToken ,因为我需要在不同的地方使用这个。有什么办法来此的authToken存储在会话或任何其他人的事。因为我没有发现任何WP7会话的例子。谢谢

I am creating a Windows 7 mobile Silverlight project. I use Rest api for authentication using a class say Authentication. I get an authentication token as a response and I assign it to a class property AuthToken because I need to use this in different places. Is there any way to store this AuthToken in session or any thing else. Because I did not find any session example in wp7. Thanks

推荐答案

你没有找到任何会话的例子,因为WP7不具备会话据我所知。您应该能够使用独立存储,让您的authToken左右。请记住,但是,它一定的时间像你用会话后,预计不会过期。

You're not finding any session examples because WP7 doesn't have session as far as I know. You should be able to use Isolated Storage to keep your AuthToken around. Bear in mind, however, that it wont expire after a certain amount of time like you'd expect with a session.

相关示例请参见以下或者谷歌搜索的独立存储:
的http:// www.windowsphonegeek.com/tips/all-about-wp7-isolated-storage-store-data-in-isolatedstoragesettings

See the following or google search Isolated Storage for examples: http://www.windowsphonegeek.com/tips/all-about-wp7-isolated-storage-store-data-in-isolatedstoragesettings

希望它帮助。我没有做过WP7开发了很多,但我熟悉的Silverlight。

Hope it helps. I haven't done a great deal of WP7 development, but I'm familiar with Silverlight.

这篇关于Windows Phone 7的Silverlight中使用会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆