Login to redirect to https:// page

From: Andrew Downum (andrewd_at_A7microsoft.D0Tcom)
Date: 07/18/03


Date: Thu, 17 Jul 2003 15:22:54 -0700


You can check to make sure that the connection is secure
by testing Request.IsSecureConnection and then redirect if
needed.

in C#
if(!Request.IsSecureConnection)
{Response.Redirect(Request.RawUrl.Replace
("http://", "https://"));}

 ~ Andrew
>-----Original Message-----
>I want users to login the very first thing they do with
SSL . But that
>force them to type
>https://mywebsite.com or is there a way to redirect
http://mywebsite.com to
>https://mywebsite.com/login.aspx
>
>
>Thanks in advance
>
>Randy
>
>
>
>.
>



Relevant Pages

  • Re: Login to redirect to https:// page
    ... Randy ... > You can check to make sure that the connection is secure ... > by testing Request.IsSecureConnection and then redirect if ...
    (microsoft.public.dotnet.security)
  • Redirecting from Secure page (HTTPS) to a nonsecure page
    ... "You are about to redirect to a connection that is not secure. ... information are you sending to the secure site might be retransmitted to a ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • testing for https
    ... I'd like to test whether a connection is secure or not, ie http, or https so I can redirect to the https if need be. ...
    (comp.lang.php)
  • Shed quote maybe than twist with Nellys orthodox jam.
    ... They are terming relative to the examination now, won't secure ... Just recruiting round a consumption despite the archive is too ... Let's may in connection with the gradual labs, ... Satam will across claim them on you. ...
    (sci.crypt)
  • Re: Please help us with a fraud situation
    ... You won't have a 100% secure connection. ... I don't think you loose your informations only on the internet connection. ... Dont open attachments or emails from anyone you dont know ...
    (comp.security.firewalls)