开发者

session sharing between silverlight and asp.net

开发者 https://www.devze.com 2023-01-30 11:46 出处:网络
I have a silverlight application that开发者_Go百科 uses wcf service. This application is shown from a link in an existing project of asp.net web application type. There is a userid session found in th

I have a silverlight application that开发者_Go百科 uses wcf service. This application is shown from a link in an existing project of asp.net web application type. There is a userid session found in the project that i want to transfer it to the silverlight application. I thought of query string but its not a secure thing to do it. so is there a way to transfer the asp session object to the wcf application which the silverlight application communicate with?


You could write a web service that you could use in Silverlight and with which you could get and set single values from and to the current session.

If you want to transfer the whole session to Silverlight, this is of course also possible by a query parameter or the like.

Concerning security, it depends on your scenario. There is no way around that, you do have to send the data over the wire to the client in some way. You can encrypt it, but the Silverlight client will have to know how to decrypt it. Silverlight client code can of course always be inspected in reflector by anyone who has access to the application.

What you can do is set everything up to use SSL for communication, it might be sufficient for your scenario if you never send more information to a client than a client is allowed to know.


If you can run WCF services in ASP.Net compatibility mode then you would be able to share all of the ASP.Net Runtime Objects such as Session, Cache etc.

0

精彩评论

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

关注公众号