locked
XBAP automatically sending cookies RRS feed

Answers

All replies

  • -> How do you turn this on? I would assume that if I called any WCF Service, Web Service or ADO.NET Data Service that it would automatically add any cookies to the request.

    No, ASMX web service enables ASP.NET constructs like session state etc, so it will use cookie, but in other type of scenarios, you need to explicitly set the cookie at the XBAP side using Application.SetCookie and Application.GetCookie() APIs. or your service implementation should explicitly use cookie.

    Hope this helps
    Tuesday, November 11, 2008 10:04 AM
  • Thanks for the reply!

    Anyway to get the session cookies from Application.GetCookie? I cannot get HttpOnly cookies inside the XBAP. Nor do I see them sent back when an embedded image or page source is set to a SiteOfOrigin url.

    Brian
    Tuesday, November 11, 2008 2:02 PM
  • You at least need to set the cookie beforehand, Lester has a nice example on how to use cookie to communicate between ASP.NET and XBAP:

    http://blogs.msdn.com/llobo/archive/2008/03/10/xbaps-using-cookies.aspx

    Hope this helps
    • Marked as answer by Marco Zhou Friday, November 14, 2008 10:15 AM
    Wednesday, November 12, 2008 7:08 AM