switch http to https [modified]
-
Hi All:), A site which i have developed is working on both http and and using (SSL certificate)https. My problem is that i want the use https only when once the user logged in otherwise it works on the http. Should i redirect to Page if the session object is not null then redirect to https://abc.com/default.aspx else http://abc.com/default.aspx or Is there another way in web.config or else to handle these protocols. basically i don't want to hardcode the root path Response.Redirect("https://abc.com/default.aspx") OR Response.redirect("http://abc.com/default.aspx") instead of Response.Redirect("~/default.aspx"); Thanks in Advance.... Regards Srnandan..
-
Hi All:), A site which i have developed is working on both http and and using (SSL certificate)https. My problem is that i want the use https only when once the user logged in otherwise it works on the http. Should i redirect to Page if the session object is not null then redirect to https://abc.com/default.aspx else http://abc.com/default.aspx or Is there another way in web.config or else to handle these protocols. basically i don't want to hardcode the root path Response.Redirect("https://abc.com/default.aspx") OR Response.redirect("http://abc.com/default.aspx") instead of Response.Redirect("~/default.aspx"); Thanks in Advance.... Regards Srnandan..
Get the current requested path. Check whether session is alive or not. If yes replace http with https.
Navaneeth My Website