Change http site to an https site

I am attempting to change a .net site which is an http site to all https on a iis 6 server.  The problem that I am having is I am unable to successfully do so for the following reasons.

1) It appears that the site I am attempting to convert is tied with another site.

2) I am unable to change the custom error configuration in the custom errors dialog.

3) I created a new site with the port 80, gave it the site address header that I want(https://site.com) and gave the old site(http://site.com) port 81.  The redirect for the new site was close but no cigar....it redirected to https://site2.com.

Please note that the site names used in this problem are examples.  I really need to get this done, so if anybody can help, I'd greatly appreciate it.  Thank you!
VBBRettAsked:
Who is Participating?
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
If you have a way to include this code on every page, it will do the trick for you:

  Sub MakeSecure()
    '##########
    '### Redirects a calling page to a secure connection if it's not already
    '##########

      If Request.Url.Scheme.Equals(Uri.UriSchemeHttp) Then
        Response.Redirect(Uri.UriSchemeHttps & Uri.SchemeDelimiter & Request.Url.Authority & Request.Url.PathAndQuery)
      End If
  End Sub
0
 
Paul MacDonaldDirector, Information SystemsCommented:
Why not just set "Require secure channel (SSL) under "Edit..." of the "Secure Communications" section of the Directory Security tab?
0
 
VBBRettAuthor Commented:
If it were that easy, I'd be done already
0
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
Paul MacDonaldDirector, Information SystemsCommented:
"If it were that easy, I'd be done already"
It seems likely!  Do you really need to change the ports as well?  

Is the HTTPS site is distinct (a different DNS name) from the HTTP site?  (If so, that's not clear from your post.)  Or are you just trying to force all connections to the HTTP site to be HTTPS?  

0
 
VBBRettAuthor Commented:
Force all connections to be https.
0
 
Paul MacDonaldDirector, Information SystemsCommented:
True the "Require secure channel (SSL)" setting isn't the most polite way to do that.  

What technology do you use for your web sites?  That is, are you using ASP or ASP.Net?  Or something else?

0
 
VBBRettAuthor Commented:
asp.net
0
 
VBBRettAuthor Commented:
Is that C# code?
0
 
Paul MacDonaldDirector, Information SystemsCommented:
No, VB.Net.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.