locking to https

  • Thread starter Thread starter Tommy Martin
  • Start date Start date
T

Tommy Martin

I have a credit card page on my asp.net site and i want to make sure it only
runs on a secure connection. Is there a way to make a page not run or to
redirect it to the secure connection?

Thanks
Tommy
 
Never trust IIS to do what you can do yourself in code, unless you *really*
trust the people, IT guys, or script that set your IIS settings.

Ideally, you should set IIS correctly (as this will be faster on the
server), as well as code for redundancy. You can add this to your
page_load...

if (!Request.IsSecureConnection) Response.Redirect("https://secureserver");
 
Back
Top