我有一个ASP.NET MVC应用程序。在此用户登录后,我们为使用FormsAuthentication.SetAuthCookie(userName,false)登录的用户设置了一个cookie。 在其他页面中,我们使用FormsAuthentication.GetAuthCookie(userName)获取Cookie。 这个cookie值的字符串是在阅读silverlight中的cookie
Response.Cookies["username"].Value = cookiesvalue
设置我们在下载Silverlight应用程序相同的应用程序有.aspx页。 Silverlight使用代码读取Cookie
string[] cookies = HtmlPage.Document.Cookies.Split(';');
问题是,一旦会话在应用程序中到期,silverlight将无法读取cookie值。
后会话过期,我们再次使用
Response.Cookies["username"].Value = cookiesvalue
但还是Silverlight应用程序无法读取这个cookie设置的Cookie标头。
由于提前 DNM
解释你正在努力完成的事情。我们大概可以找出一个解决方案。你为什么试图读取cookie? – rboarman 2010-12-11 02:50:26