Switching users from HTTP to HTTPS after login

Last Reply on Sep 13, 2012 08:11 AM By Mudassar

Posted on Sep 13, 2012 08:10 AM

Hi

I have a following requirment. In my website, any user login with his/her credentials at that time URL should be switched to HTTPS from HTTP till the user logged out. After Log Out, URL change to HTTP from HTTPS.

I am storing username in Session and from that I can check whether user is logged in or not but how to change URL at that time.

Kindly help.

Posted on Sep 13, 2012 08:11 AM

You simply need to redirect to HTTPS. Example

Response.Redirect("https://abc.com/mysite.aspx")