Outlook Fails to Remember Security Certificate Exception

Adding an email account to Microsoft‘s Outlook email client program I was getting an error when the connection to the server was made.

There was a security exception. The certificate doesn’t match the domain which I’ve entered. Did I wish to accept it?

I am able to confirm the security exception and download the certificate from the mail server. I can chose to save it either locally or globally.

For the remainder of that day I had no further error messages and the connection to the mailbox continued to work, both sending and receiving emails.

However, next time when I restart the computer it’s all the same once more – deja vu! Outlook once more states the error, requiring the certificate to be downloaded again.

Outlook had not permanently saved the exception.

Is there a means to ensure that Outlooks remembers the certificate security exception?

I was unable to find documentation which showed this to be possible.

This does raise the question:

Why am I still seeing the certificate error message, given that I have already downloaded and set the exception?

I had configured Outlook with an email account for a domain hosted on a generic mail server.

The mail server is used to host lots of domains. Some of its configuration settings are therefore generic, not specific to one of the hosted domains. An example of this is the SSL certificate. Whenever I start the computer and open Outlook afresh I get an error message relating to the certificate being invalid.

The cause of the error is the certificate, it is a wildcard certificate for a domain, allowing it to be applied across a number of mail servers.

However, this is specific to the hosting infrastructure and doesn’t match the individual domains which are being hosted.

As I was configuring the mailbox to use a generic mailbox with representation for a domain I chose to configure the incoming and outgoing email server by its generic reference, which matched the domain given in the security certificate.

With this change made all was well. Now when I start the computer and open Microsoft outlook there is no error message reporting that the security certificate doesn’t match the domain.

To find the reference for the mail server I used the DNS dig command to get the IP address. For example

dig mail.example.com

I was then able to use the nslookup command to derive the name of the mail server from the IP address. For example:


Add Browser Redirection to ASP.NET File

Perhaps a page was created with a spelling error, or a reorganisation of the website means that a particular page has been renamed.

We wish to redirect our visitors to the page to a different address.

In the example below its assumed that the website page has moved to www.example.com/fruit-and-veg/.

We wish to tell the browser to redirect to the new page name by adding a short snippet of code to the page.

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
Response.Status = "301 Moved Permanently";

The code example above can be added to the page. This is for a dynamic asp.net page. It won’t work for a static HTML page.

In the above I’ve included the notification that the change is permanent.

Browsers will cache the redirect, after all you’ve told the browser that you no longer wish the old page to be visited. You may find forcing browsers to adopt a change back difficult to achieve, with the browser reluctant to discover the change. A further permanent redirect back again may be used.

I’ve illustrated the example using a permanent redirect. But, as noted, it’s possible that the browsers will equally permanently cache your rule. If it’s wrong then amending it may well be ignored. Experiment first with a temporary redirect, just to be safe.

If its your intention to redirect more than the single page, perhaps a whole menu section, by adding the redirect into a common header file then you may wish to reconsider your approach. Making use of the file web.config.

Add New Admin User in Windows 2012 Server

Adding a new admin user will be divided into two actions: first the creation of the new user and then secondly the assignment of the user to the admin group.

Connect to the Windows 1012 Server with Remote Desktop click on little down arrow at the top bar

Select start and then click on the server manager icon (what happened to the small icons?)

In the black bar at the top click on tools and select computer management

Add New User

To add a new user expand Local Users and groups in the tree menu on the left.

Select Users

Right click on the centre pane. For a new system there is Administrator and Guest listed.

Select New User from the popup window and enter the details for the new user.

Add User To Administrator Group

Expand Local Users and groups in the tree menu on the left

Select Groups

Double click on Administrators Properties

Click on Add to add a user to the group

In the box enter the name of the user and then click on check names. Accept the user.

Add IIS URL Rewrite

By default IIS is missing the URL rewrite.

Looking at a fresh install of IIS admin view, the icon which should be found within the section, IIS, is missing.

Having gone through the sequence to add asp.net as detailed in the article Adding ASP.NET Features to IIS7.5, I expected to find it as an option here.

Adding ASP.NET Features in IIS 7.5 Including ASP.NET

But it’s not listed.

To add this visit the page https://www.iis.net/downloads/microsoft/url-rewrite and follow the instructions, downloading and running the module.

Here’s a view of the IIS admin screen with the URL Rewrite icon, sitting between the Server Certificates and Worker Processes on the bottom row of the IIS section.

Add IIS URL rewrite, icon added

Adding ASP.NET Features to IIS7.5

By default Windows 7 IIS is missing the asp.net features, shown above the IIS section in the control panel

The control panel is shown below with only the IIS options and Management options.

Adding ASP.NET Features in IIS 7.5

To add the asp.net features. Begin by opening the control panel and selecting from the Programs section the option Turn Windows features on and off.

Adding ASP.NET Features in IIS 7.5 Windows Features

Click on the checkbox for ASP.NET.

Adding ASP.NET Features in IIS 7.5 Windows Features add ASP.NET

There’s a dialogue window confirming that the amendment is taking place:

Please wait while Windows makes changes to features. This may take several minutes.

You may find that this takes a few minutes. Wait whilst the dialogue completes.

I have read that IIS is to be restarted for the change to show. However, for me it was sufficient to close the management window and reopen it once more.

Adding ASP.NET Features in IIS 7.5 Including ASP.NET

Whilst the control panel ASP.NET section is missing by default its easy to add it in, following the steps above beginning with the control panel.

Windows 10 Manually Checking for Windows Updates

Looking to update Windows 10 manually where can I find the Windows Update page?

Windows 10 Windows update: select settings

From the Windows home screen click on the Windows icon in the bottom left hand corner and then the Settings icon a little above.

Windows 10 Windows update: Windows settings

This view shows the main Windows Settings page. The section of interest is Update & Security, at the bottom. Click on it.

Windows 10 Windows update: Settings Windows update

On the left is a menu of options, including our item of interest, Windows Update, listed at the top. If Windows Update isn’t showing select it from this menu.

Highlighted with a grey background is the manual trigger for the Windows Updates. Click on this to begin a manual check of available updates.

Windows 10 Windows update: check for updates

The page changes to show the update status. Initially a check is made for available updates.

web.config Redirect non-www to www

That often looked for website redirect from the non-www version of the website URL, address, to the www version.

In this case the redirect is for a Windows hosted website, using the web.config file to set the redirect rules.

I wish to avoid adding the redirect within the website coding. By taking advantage of the redirect rules within the web.config file. This will make them readily available and can be edited without recompiling the website code.

Access your website either using FTP or the editor/manager within the housing website control panel.

The file to be edited is located at the root of the website. This may be a directory down. Check if you have a directory such as public_html.

It’s easier to edit the content of the web.config file of is laid out correctly and colour coded. An HTML editor will make your life easier when editing.

Shown below is the code to add the redirect of the non-www address to www to be added to the web.config asp.net website configuration file:

        <rule name="Canonical" stopProcessing="true"> <match url=".*" /> 
                <add input="{HTTP_HOST}" negate="true" pattern="^www\.([.a-zA-Z0-9]+)$" /> 
            <action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" redirectType="Permanent" /> 

The above is to be added within the section <system.webserver>

As as a bonus below is the HTTPS version too!

        <rule name="Redirect to HTTPS" stopProcessing="true"> 
            <match url="(.*)" /> 
                <add input="{HTTPS}" pattern="^OFF$" /> 
            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /> 

Putting this all together gives:

        <rule name="Canonical" stopProcessing="true"> <match url=".*" /> 
                <add input="{HTTP_HOST}" negate="true" pattern="^www\.([.a-zA-Z0-9]+)$" /> 
            <action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" redirectType="Permanent" /> 
        <rule name="Redirect to HTTPS" stopProcessing="true"> 
            <match url="(.*)" /> 
                <add input="{HTTPS}" pattern="^OFF$" /> 
            <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /> 

Technically it’s a 301 or 302 redirect. Looking at the code above it can be seen that I’ve used the redirectType parameter value of permanent showing the redirect to be of type 301. web.config rewrite rules to permanently redirect non-www to www.

Change Windows 2008 User Password Lost Current Password

Having lost the current password for a Windows 2008 server user account. How do I change the password?

If I follow the control panel link to the user and look to reset the password, a part of the dialogue requires entry of the current password. Which I didn’t have!

Its possible to get around this requirement from a command prompt.

Right click on command prompt, from the menu, and select to run as administrator


net user username *

When asked, enter the new password, and re enter for confirmation.

Obliged to confirm that the password change is correct and the anticipated value has been entered I once more tried logging in with a remote desktop session from another computer.

Using the command prompt as opposed to the user control panel I was able to reset a user password without the knowledge of the current password.

Install ExpressMaint SQL Backup Utility

ExpressMaint is a utility which may be used to automate the backup of SQL Server databases.

It can be used to create and save a backup of each of the databases within an SQL Server. Better still it can be set to age the files, deleting all those older than, say, a month.

The ExpressMaint project home page is here: https://expressmaint.codeplex.com/

Download a copy of the zip file ExpressMaint.zip. Extract the ExpressMaint.exe file contained within to your scripts directory.

I’ll assume that the exe file has been added to the folder as: z:\ExpressMaint.exe.

I use a batch file to call the exe file, passing the relevant parameters.

And I have created a backup directory for the databases at z:\backup.

The batch file for running ExpressMaint is located at: z:\expmaint.cmd.

Contents of which are given below

"z:\expressmaint.exe" -S webserver\SQLserver -D ALL_USER -T DB -R "z:\dbBackup" -RU WEEKS -RV 4 -B "z:\dbBackup" -BU WEEKS -BV 4 -V -TO 20

In the above change the name of the server webserver and Sqlserver as appropriate.

shows example for individual database location

I created a scheduled task to run daily.

On Windows Server 2012 I found that expressmaint.exe wasn’t running as a scheduled task.

Searching for more information about the cause of the issue. I found this on stack exchange, which recommend using a later version of ExpressMaint:

I am actually using expressmaint with sql server 2012 express so u shouldn’t have any problems. make sure u use

https://expressmaint.codeplex.com/downloads/get/91612 which is version and NOT

Stack Exchange article reference is:

Expressmaint with SQL Server 2012

Following the referenced link and using that version of ExpressMaint worked.

Where’s the Windows 10 Control Panel?

Accessing the Control Panel in Windows 10 is one of those of course how obvious moments.

I found that the main control panel home page in Windows 10 was access by simply right clicking on the Windows logo at the bottom left hand corner of the screen.

Right click on the Windows logo to show a menu of admin related options.

Windows 10 open the control panel

The control panel is listed here amongst the other admin actions.