469,571 Members | 1,557 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,571 developers. It's quick & easy.

Enforcing https.

Hello gurus,

We have a site that need security upgrade to run over https.
We want people to be redirected to https:oursite when the type what the
know, http:oursite.

Is this possible?
mnay thanks
Dec 11 '06 #1
4 1073
"Jens Jensen" <jj@jensen.dkwrote in message
Is this possible?
Several ways:

1) AFAIK, you can set it in IIS


protected void Application_BeginRequest(Object sender, EventArgs e)
if (HttpContext.Current.Request.IsSecureConnection.Eq uals(false))
Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"]
+ HttpContext.Current.Request.RawUrl);

Dec 11 '06 #2
Hi Mark and thank you for your quick response.

solution 2) looks very elegant, but could you provide more detail on 1).

2) require a new build and upload which we cant afford right now due to
heavy load.
many thanks
Dec 11 '06 #3
"Jens Jensen" <jj@jensen.dkwrote in message
solution 2) looks very elegant, but could you provide more detail on 1).
Dec 11 '06 #4
Great great,
Many thanks
Dec 11 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by kiran | last post: by
2 posts views Thread by Craig Keightley | last post: by
16 posts views Thread by Paul Sweeney | last post: by
3 posts views Thread by Xamle Eng | last post: by
12 posts views Thread by Grunff | last post: by
14 posts views Thread by Peter Chant | last post: by
1 post views Thread by Groove | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.