Try Now
More in this section

Forums / Developing with Sitefinity / MVC widget in hybrid mode can't set cookie?

MVC widget in hybrid mode can't set cookie?

2 posts, 0 answered
  1. Adam
    Adam avatar
    4 posts
    08 Jul 2014
    22 Jul 2014
    Link to this post


    I have a page that is in hybrid mode. I have an MVC widget on that page that in its controller action is calling:

    HttpContext.Response.Cookies.Add(new HttpCookie(cookieName, cookieValue));

    It then returns a ViewResult. 

    But when viewing the response in Fiddler there is no Set-Cookie header creating this cookie. 

    Is this a limitation of Hybrid mode? MVC widgets can't create cookies? Or am I doing it all wrong?


  2. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    04 Jan 2016
    24 Jul 2014
    Link to this post

    This problem is most likely caused by an issue in 7.0 - in mvc, the applicationinstance and cookies were not copied. This was resolved in 7.0.5110 as noted in the release notes:http://www.sitefinity.com/developer-network/forums/general-discussions-/internal-hotfix-builds#8aEWwwrvu0OxdzzBKFw8Ag

    Please, try upgrading to this version.

    Atanas Valchev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered