Larry Brister
asked on
SSL https .net web site force redirect
On my web site I have the code below in my master page as well as my stand alone login page
But When I do a scan for compliance I see this message
What can I do to correct this?
But When I do a scan for compliance I see this message
What can I do to correct this?
Dim context As HttpContext = HttpContext.Current
If Not context.Request.IsSecureConnection Then
Dim secureUrl As New UriBuilder(context.Request.Url)
secureUrl.Scheme = "https"
secureUrl.Port = 443
context.Response.Redirect(secureUrl.ToString, False)
Return
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is the error message. It is possible you have the rule in the wrong section.
-saige-
-saige-
ASKER
Is there anything else that needs to happen in IIS for that? I'm getting an HTTP IIS Error screen