asp.net获取请求的协议头是否启动了SSL(Https)

方法:

HttpContext.Current.Request.IsSecureConnection SLL:True
HttpContext.Current.Request.Url.ToString().ToLower().Contains("https") SLL:True
HttpContext.Current.Request.Url.Scheme SLL:https

参考:

http://stackoverflow.com/questions/1356389/asp-net-check-if-page-is-http-or-https

posted @ 2017-01-19 13:05  EasonJim  阅读(2162)  评论(0编辑  收藏  举报