?
Solved

Change http site to an https site

Posted on 2011-10-21
9
Medium Priority
?
375 Views
Last Modified: 2012-05-12
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!
0
Comment
Question by:VBBRett
  • 5
  • 4
9 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37006088
Why not just set "Require secure channel (SSL) under "Edit..." of the "Secure Communications" section of the Directory Security tab?
0
 

Author Comment

by:VBBRett
ID: 37006181
If it were that easy, I'd be done already
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37006209
"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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:VBBRett
ID: 37006556
Force all connections to be https.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37006846
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
 

Author Comment

by:VBBRett
ID: 37008094
asp.net
0
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 2000 total points
ID: 37008119
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
 

Author Comment

by:VBBRett
ID: 37018449
Is that C# code?
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37018485
No, VB.Net.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question