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

时间:2017-01-19 14:27:09   收藏:0   阅读:552

方法:

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

原文:http://www.cnblogs.com/EasonJim/p/6306166.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!