62,040
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!HttpContext.Current.Request.IsSecureConnection)
{
// send user to SSL
HttpContext.Current.Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"] + HttpContext.Current.Request.RawUrl, true);
}
}
}