首页 > 代码库 > asp.net获取请求的协议头是否启动了SSL(Https)

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

方法:

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

参考:

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

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