Redirecting HTTP Traffic to HTTPS in SharePoint 

Tags: Information Architecture, Installation / Setup, MOSS 2007, Security, SharePoint, WSS 3.0

Recently, we deployed a large project for a multinational corporation and an interesting situation arose during the process.  The SharePoint portal for this particular client was accessible externally (outside of their corporate network).  This allowed users to access the sites worldwide without having to use a VPN to connect to the corporate network.  This is not uncommon in the SharePoint world, and we have implemented and configured a fair number of Extranet portals over the years.

 

This particular project was very document-centric (as are many in SharePoint), with multiple workflows for approval, updating, publishing, etc.  Because of this, the Microsoft Word client was heavily used in the application, and seamless client integration was a critical important requirement. 

 

During beta testing, we discovered two strange occurrences:

1) Emails generated by the automated task creation (for document approval) had a mixture of URLs with http and https.
2) When opening a document for editing/approval, the user sometimes received an error that he/she could not approve or edit the task associated with the document.

 

These were both very strange, and after some extensive testing and troubleshooting by our team, we were able to isolate the problems and we determined that the root cause was due to the fact that users were accessing the SharePoint site in different ways; http and https.

 

Issue #1:

As I mentioned above, users do not need a VPN connection for accessing the portal, but they do need a VPN connection for many other tasks.  Ultimately, it was because of this “dual access” to SharePoint that users were seeing inconsistent behaviors.  When a user was connected via the VPN, all URLs were http.  However, when accessing the site externally, all URLs were https.  What’s important to note is that the workflows and tasks generate emails links, etc. using relative paths.  What this means is that the protocol (http or https) will be prefixed based on how the user is connected.  When a user was connected via VPN, all links were generated as http and when not on the VPN, all links were https.  When a user not on the VPN clicked on an approval link that had been generated while the submitting user was on the VPN, the document and site would be unreachable (http does not work outside of the network).

 

Issue #2:

In addition to the links, we noticed that when a document was opened in Microsoft Word, there were inconsistencies as to whether or not the document would allow you to edit the associated task.  Take a look at the two screenshots below.  The first is from our development server (where everything always works) and the second is from the live, production server.

 

Development:

image

 

Production: 

image

 

To make a long story short, we ultimately concluded that this too was caused by the mixed http and https issues, and this was further supported by a new message that we had yet to see in a SharePoint environment.

clip_image002

 

The Solution:

The solution to this can be handled in a few different ways.  One such way is by using ISA Server, which can force all http requests to be https before they are sent to SharePoint.  In our case, the client did not have ISA, so we were forced to look elsewhere for solutions.  Thankfully, with the concept of Alternate Access Mappings and IIS redirects, we were able to provide a workable solution for our client. 

 

There are basically four (4) high-level steps to make this happen:

1) Configure Alternate Access Mappings so SharePoint is aware of the https URL.

2) Change the port of the existing SharePoint site in IIS and require https access to the site.

3) Create a new IIS site for http—>https redirection.

4) Configure the new IIS “redirector” site to be a permanent redirection to the https site.

** Note: If you are using IIS 7, in addition to the directions regarding Permanent Redirection you should open the Error Pages icon for the redirector site, and edit the 401 error.  Select the radio button for “Respond with a 302 redirect” and enter your SSL site in the Absolute URL box.

 

You may be asking yourself, why this was not found until later in the process, specifically beta testing.  Since the development environment did not have SSL (http), all development was consistently performed using http.  It wasn’t until we deployed the beta version of the solution that users were able to quickly let us know the issues they were running into.  This also goes to show how important multi-stage deployment can be before the masses begin using the product.

 

The following article served to be a great resource in helping us find a solution to these issues and led us in the right direction.  You can find more information on each of the four steps above at OS.com.

 

 
Posted by Curtis Hughes on 11-Nov-09
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:          
 

Links to this post



Even More SharePoint 2010 News; SPC09 Day 3; Windows 7 Hits the Street

Trackback from SharePoint Daily on 22 Oct 2009





Does SharePoint 2010 Deliver?; Is Microsoft Still Relevant?; Bamboo Products & SharePoint 2010

Trackback from SharePoint Daily on 27 Oct 2009





SharePoint Makes the Donuts; Los Angeles Moves to Gmail; Government 2.0 = Free Data?

Trackback from SharePoint Daily on 28 Oct 2009





Why Did L.A. Chose Google?; Azure for Open-source Developers; Business & Tech on SharePoint 2010

Trackback from SharePoint Daily on 29 Oct 2009





Is Recent SharePoint Success at Risk?; A Silver Lining in the Recession; Patch Tuesday Focuses on Windows

Trackback from SharePoint Daily on 11 Nov 2009





Did Microsoft Copy Mac OS for Windows 7?; Office 2010 Public Beta Next Week?; Cloud Computing Revenue Up 18%

Trackback from SharePoint Daily on 12 Nov 2009





SharePoint MVP 2010 Predictions; App War is Brewing in the Cloud; Google Mounts Attack on Microsoft in the Enterprise

Trackback from SharePoint Daily on 04 Jan 2010





Five New SP2010 Features; Oracle to Take on Microsoft Office; Could the iPad Give Microsoft Fits?

Trackback from SharePoint Daily on 29 Jan 2010





duration

Trackback from buy cialisorder cialis cialiscan on 13 Mar 2010





heat

Trackback from discount generic viagra online on 13 Mar 2010





rubber

Trackback from discount generic cialis online on 13 Mar 2010



Comments

Name:
URL:
Email:
Comments: