+1-888-365-2779
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
    Registered:
    08 Jul 2014
    22 Jul 2014
    Link to this post

    Hi,

    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?

    Thanks!

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

    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.


    Regards,
    Atanas Valchev
    Telerik
     
    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