on-internet
← Community

Secure flag not set to Cookies in .Net application

Stack Overflow ·

I have included below lines of code in my Web.Config and Global.asax.cs file. Still when I use developer tools in browser I could see secure flag not set to the below Cookies. Also Configured SSLSettings in my IIS(Selected checkbox requireSSL). I would like to set Secure attribute to all Cookies not only to received but also to Sent cookies. Any suggestion please. In Web.config: <httpCookies requireSSL="true"/> In Global.asax.cs: protected void Application_EndRequest(object sender, EventArgs e) { if (Request.IsSecureConnection == true && HttpContext.Current.Request.Url.Scheme == "https") { Req

Comments

Sign in or sign up to comment and upvote.

No comments yet.