Oct 21 2009

Redirect pages to HTTPS in IIS

Some times there is a need for clients to have only particular pages protected by and SSL Cert. which means we need to create a redirect to HTTPS, this could be done on the page level through the code, but there is a better way, via IIS, let me show you how.

First thing is first ensure you have installed your  valid SSL onto your IIS Server, once its installed you should be able to view the certificate, and will look something like this:

image

 

Next you need to select which files or folders you want to have protected with your SSL, in other words which pages do you need to be HTTPS:// on, in this case I have selected the ‘login’ folder on my website, within IIS locate the folder or file right click on it and choose ‘Properties’ .

If you selected a folder look for the ‘Directory Security’ Tab

If you selected a file look for the ‘File Security’ Tab.

Select the appropriate tab, toward the bottom within the ‘Secure Communications’ you will see an ‘Edit’ button click this, you will then be prompted with a pop-up box with some additional options, here you will notice that ‘Require secure channel (SSL)’ and ‘Require 128-bit encryption’ are not ticked, tick both of these options, then press OK. And Ok once more.

image

 

Because all requests to the folder or file you have set now MUST use HTTPS, people by default will get a  generic IIS 403.4 error, to prevent this error and redirect the user to the HTTPS link you must perform a redirect. IIS can do this for you.

clip_image002

Above we show the HTTP errors that IIS contains, change the highlighted one to use a custom script for redirection to HTTPS:

I have called mine RedirectSSL.Htm and replaced the default 403.4.htm with the custom error.

Note: The above custom error should be set at the website level

Ensure the custom error has the following contents

<SCRIPT type=text/javascript>
<!–
if (location.protocol != ‘https:’)
{
window.location = ‘https://’+ location.host + location.pathname + location.search;
//alert(location.host + location.pathname + location.search); Just for sanity check
}
// –>
</SCRIPT>

This script will change your URL to add the HTTPS prefix, by using this as your landing page for the error 403.4 the user will be re-directed to the URL with HTTPS in front forcing them to use your SSL.


Oct 9 2009

OLE registration error occurred outlook 2003

So on your outlook 2003 your getting an ole registration error occurred. Well don’t stress, its an easy fix.

Close outlook 2003

Open start > Run > type:

regsvr32 %windir%\system32\ole32.dll

No open Outlook and try again…

Still not working?

then give this ago

Open Outlook again

  • click on the Send/Receive pull / Drop-down menu ( this is the same button which gives the error message, the pull down is located on the right side, its an arrow)
  • Choose Send/Receive Settings
  • Uncheck “Make This Folder Available Offline”
  • Now re-check “Make This Folder Available Offline” again

 

Done!