Here's a user control that I made that works quite well. All you have to
do is include it in the pages that you want to ensure SSL with...
<%@ Control language="c#" %>
<script runat="server">
public void Page_Load(object sender, System.EventArgs e)
{
if (!Request.IsSecureConnection)
{
string strSecureURL = "https://";
strSecureURL += Request.ServerVariables["SERVER_NAME"];
// strSecureURL += Request.ServerVariables["URL"];
strSecureURL += Request.RawUrl;
Response.Redirect(strSecureURL);
}
}
</script>
Shan Plourde
Brian Henry wrote:
thanks
"ASP.Confused" <anonymous@> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The "HTTPS" key within the Server object should tell you whether SSL is
being used or not. If this doesn't work for you, then use the
"SERVER_PORT"
or "SERVER_PORT_SECURE" keys within the Server object.
"Brian Henry" <br**********@newsgroups.nospam> wrote in message
news:ef**************@TK2MSFTNGP12.phx.gbl...
Hi,
I have a web site i want to be SSL (we already have the cert and
everything
from verisign) but i want port 80 to redirect to the ssl connection 443
(HTTPS) so if they go to the site at http://site it will determin hey im
not
ssl and redirct to https://site how would you do this? thanks