include::../description.adoc[] == Noncompliant Code Example ---- using System.Web; using System.Web.Mvc; [HttpGet] public ActionResult index(string val) { Response.AddHeader("Set-Cookie", val); // Noncompliant HttpCookie cookie = new HttpCookie("ASP.NET_SessionId", val); // Noncompliant Response.AppendCookie(cookie); return View(""); } ---- == Compliant Solution ---- using System.Web; using System.Web.Mvc; [HttpGet] public ActionResult index(string val) { Response.AddHeader("X-Data", val); HttpCookie cookie = new HttpCookie("data", val); Response.AppendCookie(cookie); return View(""); } ---- include::../see.adoc[] ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] include::../highlighting.adoc[] endif::env-github,rspecator-view[]