Web page
I am using vs.net 2003 to develop Web applications, the default is the HTTP protocol, I would like the user login module for HTTPS encryption transmission, but do not know how to use, please enlighten me. Thank you.
To have an ASP page start with HTTPS, add the following code at the top of the ASP page:
<%
Response.Buffer = True
If (Request.ServerVariables ("HTTPS") = "Off") Then
Dim xredir__, xqstr__
xredir__ = "https://" & Request.ServerVariables ("SERVER_NAME") & _
Request.ServerVariables ("Script_name")
xqstr__ = Request.ServerVariables ("query_string")
If xqstr__ <> "" Then xredir__ = xredir__ & "?" & xqstr__
Response.Redirect xredir__
End If
%>
Instead, force it to start with HTTP.
Please add the following code
<%
Response.Buffer = True
If (Request.ServerVariables ("HTTPS") = "on") Then
Dim xredir__, xqstr__
xredir__ = "http://"& Request.ServerVariables (" SERVER_NAME ") & _
Request.ServerVariables ("Script_name")
xqstr__ = Request.ServerVariables ("query_string")
If xqstr__ <> "" Then xredir__ = xredir__ & "?" & xqstr__
Response.Redirect xredir__
End If
%>
I wish I could be of some help to you.