Redirecting SharePoint Websites from Port 80 to 443 using IIS 6 and no code!

Here’s a quick guide to redirect SharePoint websites from port 80 to 443 SSL without code.

Before you start you need to make sure that the host header for port 80 is not already assigned to the SharePoint Web App. If it is just edit the hostname and just call it something like ‘notused’ – kind of gives you a clue when other administrators log on that this is not in use.

Next step is to do is create an IIS web site using the IIS mmc and not through SharePoint. Lets say that the SharePoint site is called ‘sharepoint’ enter the details as shown below changing the IP address you have assigned for the sharepoint DNS record.


Once you have created the Web Application right click on it and select properties. Navigate to the home directory tab


Change ‘The content for this resource should come from:’ to A redirection to a URL


Enter the url https://sharepoint (Noting https) and check the box The exact URL entered above and click ok.

You now have a redirection from http to https!

Excluding items (Document Libraries, Lists, Items etc) from SharePoint scopes

There’s a great article that can be found here listing the different types of contentclass that can be removed from SharePoint scopes. Basically adding these with exclude option will stop such things as lists appearing in search results.

Simply modify the search scopes in the SSP by clicking new rule. Note that on this demo I am using ‘all sites’ scope (I’m being lazy) however I would advise for live environments creating a separate scope and editing the properties of this.


On the new rule select the following properties


and click ok!

This will now remove document library’s from appearing in search results but still display documents within – no re-crawl is required as this configuration is applied at the scope level and not at the content source level.

Further contentclass properties can be found on Jeremy Jameson’s blog.

Cannot login to SharePoint Central Administration Event Code: 4007 - URL authorization failed for the request – Overwriting the SharePoint 12 Hive Problem!

I recently had an issue where users who were added to the Farm administrators group could not log into SharePoint Central Administration.
If the below does not resolve your issue please see my other blog which has the same symptoms (Do read this linked entry before discarding).
After lots of digging around I found that this was due to the web.config in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\ADMIN.
The web.config shown below shows the issue:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <compilation batch="false" />
    <customErrors mode="On" />
    <httpRuntime executionTimeout="1200" />
      <allow roles="BUILTIN\Administrators" />
      <allow roles="EXTRANET\WSS_ADMIN_WPG" />
      <deny users="*" />
  <location path="vsgeneralsettings.aspx">
      <httpRuntime executionTimeout="3600" />
  <location path="targetwebapplication.aspx">
      <httpRuntime executionTimeout="3600" />
  <location path="configureupgradedatabases.aspx">
      <httpRuntime executionTimeout="3600" />
I noticed that ‘EXTRANET’ was the name of the old server and the new server was called for example ‘SERVER1’ (noting that this is the name of the local server and not the domain name so this will differ on each server in the farm).
I updated the line with the following:
      <allow roles="SERVER1\WSS_ADMIN_WPG" />
I carried out an IISRESET and farm administrators could now log onto SharePoint Central Administration.
Credit to MVP Andreas Stenhall’s blog which helped me track down this issue.

Errors after installing Infrastructure update for MOSS 2007

I've ran into this issue a couple of time when installing service pack updates and on both occasions found Akifs blog below so felt it was worth a mention, details of the specific issue can be seen below:


Errors after installing Infrastructure update for MOSS 2007
During last month, I applied Infrastructure udate of SharePoint 2007 in my development envrionment and everything was working like a charm. So I decided to apply the same fix in my production environment this week.

Here I will like to mention one thing. I started this project as migration one where we were supposed to migrate MOSS 2007 + Windows 2003 environment to MOSS 2007 SP1 + Windows 2008 environment. So it was basically a restored farm.

After applying the Infrastructure upgrade, I started facing the issues:

"The resource object with key 'S2SearchAdminDashboard_Title' was not found" for Search Administration site


"The resource object with key 'S2LeftNav_Administration' was not found" for other search links.

After searching a while on Google, I was able to find the solution. Solution is quite simple. Sort all files within App_GlobalResources folder based on the date in the development environment where everything was working fine. Copy files which were modified on 3/25/2008. These will be the most new ones. Copy them over to the SSP virtual directory of your troubling farm within the same App_GlobalResources folder. These files are:

and sps.resx

Then if you will try, you will get the following error:

Could not find the sitemap node with URL '/SearchAdministration.aspx'.

Now this time, copy layouts.sitemap file which will be the most latest modified file within _app_bin folder from the development environment to production environment. As soon as that was copied over, the search administration page appeared fine.

Cannot Edit Content Source Schedule in SharePoint receiving error ‘Access is denied’ KB926959

I have experienced this issue on a few occasions now so thought it was worth a mention.

Following best practices and creating accounts with least privileges in SharePoint may lead to an issue when you attempt to edit the SharePoint content source and my have an error displayed stating access is denied.

This is because the SharePoint Worker Process Group account (WSS_WPG) does not have permissions to the c:\windows\tasks folder.

To resolve this issue follow the article KB926959. The article does not state which server to apply this to so I would suggest applying this to all SharePoint servers in the farm – If anyone would like to feedback please comment. Also worth noting the WSS_WPG account is a local account and not a domain account.

Please note that on step 3 the command below may not work.

attrib –s %windir%\tasks

So before entering this command enter:

attrib +s %windir%\tasks

Then enter the first command again and that should work!

I’m not sure why this doesn’t work but I reported this to MS sometime ago.

Saving PDF files to SharePoint

When attempting to save PDF files directly into SharePoint via using web folders you will not be able to browse the SharePoint document libraries.

The reason for this is Adobe does not support saving to web dav directly and the suggested workaround is to save the file to the local pc then upload to SharePoint see article

I have managed to find an add on to Adobe which enable you to select document libraries to save to. The product is called PDF SharePoint Save and can be located here

Calculated date does not trigger workflow when created using SharePoint Designer

I was recently creating an improved content review workflow using SharePoint Designer.

The scenario was that I wanted to send the author of the document an email 2 weeks before the review deadline and then another once the review date had arrived.

I setup 3 site columns:

  • AuthoredBy – People / Group
  • ReviewDate – Date and Time (Date Only)
  • ReviewDateWarning – Calculated Field of Review Date – 14 (14 days / 2 weeks)  (See below)


Once the 3 columns were created I then opened up SharePoint Designer to start creating the workflow.


At first I thought my workflow was failing (and rightly so) because my condition was set to ‘to equal’ when it should have been set to ‘to equal (ignoring time). I changed this hoping that this was the problem so now my workflow looks like this:


Still no joy! When the workflow was triggered it just stated ‘waiting for DateReviewWarning’ even though the date was set to today's date. The picture below shows that the calculation of the date review working as expected but for some reason SharePoint does not see the calculated date as a native date field. When I replaced the field with the actual DateReview field and set this to today's date the workflow worked like a dream.


Unlike most of my blogs I didn’t find a fix to this but thought it was worth sharing the frustration I had when recently trying to implement this.

I’d be interested to hear from the SharePoint community on if other have managed to work round this (and I’m sure they have!).

Office 2003 save to local drafts workaround

The following article describes a workaround to the Office 2007 save document to local drafts folder functionality being enabled when working with Office 2003.


Reading many articles on this and many people are suggesting the only way to get this functionality is by upgrading to Office 2007. To get round this Microsoft have recently made SharePoint Designer 2007 a free download. If you install this on a pc that has the Office 2003 suite installed this prompt will now be available FOR FREE!

I appreciate this is not an ideal solution for enterprise organisations however in the current economic climate this may be something that could be an option and fairly easily deployable via group policy.

Do remember though working offline on laptops that have unencrypted hard disks could put your data at risk.

Multi lookup for people selector causes field not to display in Office 2003

I created a custom field that looked up AD users. The field was assigned to a content type and was a mandatory field.

The requirement was to add multiple people to the column so i changed the column to allow multiple selections.

Once I changed this field I noticed that when creating a document and subsequently saving the document adding content type specific metadata in Office 2003 the custom lookup column was no longer available. This caused an additional problem as I could not check the document in as the mandatory custom column required entering. I had to manually edit the document properties adding the custom field data before being able to check in.

I have no problem doing this however I am a SharePoint Admin and this is an end user type activity so pretty poor user experience.

The only solution to get round this is to upgrade to Office 2007!