MVC widget in hybrid mode can't set cookie?

Posted by Community Admin on 04-Aug-2018 00:36

MVC widget in hybrid mode can't set cookie?

All Replies

Posted by Community Admin on 22-Jul-2014 00:00

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!

Posted by Community Admin on 24-Jul-2014 00:00

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
 

This thread is closed