title: Is it possible to mark the cookie ASP.NET_sessionID as secure
body: <p>After a security audit I got the requirement to set the cookie ASP.NET_sessionID  as "secure".</p>
  
  <p>Right now the flag is not set.</p>
  
  <p>Can I use SessionIDManager to set it as secure? I am already using it to change the value of the Session cookie after logging in with this code:</p>
  
  <pre><code>            System.Web.SessionState.SessionIDManager manager = new System.Web.SessionState.SessionIDManager();
              string oldId = manager.GetSessionID(System.Web.HttpContext.Current);
              string newId = manager.CreateSessionID(System.Web.HttpContext.Current);
              bool isAdd = false, isRedir = false;
              manager.SaveSessionID(System.Web.HttpContext.Current, newId, out isRedir, out isAdd);
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I saw that I can set </p>
  
  <pre><code>&lt;httpCookies httpOnlyCookies="false" requireSSL="true" /&gt;
  </code></pre>
  
  <p>But I only want to have this one cookie secure</p>