requireSSL not working on web site

G

Guest

I have a web site that is configured for FORMS authentication. I have the "requireSSL" parameter set to "true" and the authorization set to "deny" any unauthenticated users. For whatever reason, though, when I go to the site using HTTP it never redirects me to HTTPS.

What should I be looking for to fix this problem? Doesn't the requireSSL automatically redirect to HTTPS on an HTTP request?

Thanks
 
M

Mark Fitzpatrick

The requireSSL property of the Forms authentication doesn't actually
redirect you. The property tells whether or not the cookie that the Forms
authentication creates is transmitted using https and doesn't do anything
about redirection.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

javatopia said:
I have a web site that is configured for FORMS authentication. I have the
"requireSSL" parameter set to "true" and the authorization set to "deny" any
unauthenticated users. For whatever reason, though, when I go to the site
using HTTP it never redirects me to HTTPS.
What should I be looking for to fix this problem? Doesn't the requireSSL
automatically redirect to HTTPS on an HTTP request?
 
R

Rick Spiewak

Here's some code that might help - put it in your page load event:

If Not Request.IsSecureConnection And Not Request.Url.IsLoopback Then
Response.Redirect(Regex.Replace(Request.Url.ToString, "http",
"https")
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top