Windows Phone 7的Silverlight中使用会话

编程入门 行业动态 更新时间:2024-10-26 14:27:01
本文介绍了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/tips/all-about-wp7-isolated-storage-store-data-in-isolatedstoragesettings

See the following or google search Isolated Storage for examples: www.windowsphonegeek/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中使用会话

本文发布于:2023-11-06 17:31:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564334.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Windows   Phone   Silverlight

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!