Read cookies in silverlight
Posted
by Dharam Narayan
on Stack Overflow
See other posts from Stack Overflow
or by Dharam Narayan
Published on 2010-05-27T09:48:37Z
Indexed on
2010/05/27
9:51 UTC
Read the original article
Hit count: 565
asp.net-mvc
|silverlight-3.0
hi,
I have an ASP.NET MVC application. In this after user get Sign in .We set the a cookie for the user who logged in using FormsAuthentication.SetAuthCookie(userName, false).
In other page we get the Cookies using the FormsAuthentication.GetAuthCookie(userName]) .
This cookie values as string is then set in the
Response.Cookies["username"].Value = cookiesvalue .
We have .aspx page in the same application that downloads silverlight application .Silverlight reads the cookies using the code
string[] cookies = HtmlPage.Document.Cookies.Split(';');
The problem is that once session expires in the application,silverlight cannot read the cookie value. After the session expires we again set the cookies in headers using the Response.Cookies["username"].Value = cookiesvalue . But still silverlight application cannot read this cookie .
Thanks in Advance DNM
© Stack Overflow or respective owner