dongtaihui5131 2014-10-10 17:13
浏览 201
已采纳

asp.net cookie在localhost上安全失败

I am trying to make asp.net cookie secure like Response.Cookies["username"].Secure = true. Some reason these are failing. I mean after login I am setting this then new page is showing error "Page can not displyed".

Response.Cookies["username"].HttpOnly= true is working for all cookies. not Secure.

Is it because I am using on localhost? does it need https://?

  • 写回答

1条回答

  • donglu9978 2014-10-10 17:38
    关注

    The Secure property of an HttpCookie means that the cookie is only transmitted over SSL. So to test it you need to self-generate a certificate and have your site respond to https requests as well.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置