Category Archives: Windows Server

Quick Tip- Azure SQL Server Connectivity

Symptoms

  1. An application server in Azure can’t connect to an IaaS SQL Server on Windows (also in Azure).
  2. The Connection Troubleshoot utility in the Azure Portal says network connectivity between the App server and SQL server on port 1433 is allowed:
    image
  3. PowerShell Test-NetConnection on the App server shows that communication with the SQL Server is blocked on port 1433
    image

Cause

Windows Firewall on the SQL Server is blocking communications from the App Server

Solution

Add a rule to the Windows Firewall on the SQL Server to allow SQL Traffic. See Microsoft Docs for details on how to do this.

CSS, Javascript, Images cause 500 errors after IIS Website upgrade

Symptoms

A website has been copied from a server running IIS 6 (Windows Server 2008) to a server running IIS 10 (Windows Server 2019). Pages do not render correctly, and further investigation shows that pictures, css files, and javascript are all failing with 500 (Internal Server Error) responses. This is shown here in the F12 view in Chrome.

 2020-02-13_11-18-38

Trying to access one of these static files directly also fails and just shows the message “The page cannot be displayed because an internal server error has occurred.

2020-02-13_11-17-35

Cause

In my case, the site was referencing the FontAwesome package which uses the WOFF file type. In the older IIS this MIME type was not registered so required a manual entry in the configuration. In the newer IIS this is handled natively and the manual configuration is now causing a problem rather than remediating one.

Solution

Check the web.config file for a reference to “woff” for example

<mimeMap fileExtension=”.woff” mimetype=”application/font-woff” />

and comment out or remove this line.

2020-02-13_11-20-07

Refresh the page in your browser and it should now load correctly.

PowerShell Snippet – Find Windows 2008 VMs before EOL

Support for Windows Server 2008 and 2008 R2 ends in January 2020– just two years from the date of this post. Four years ago I put up a script to find XP and 2003 VMs, and I’ve modified this to search a vSphere environment for powered on VMs running Server 2008 as a Guest OS:

Get-VM |
 Where {$_.PowerState -eq "PoweredOn" -and
 ($_.Guest -like "*Server 2008*")} |
 get-VMGuest |
 select VmName, OSFullName

VmName    OSFullName
------    ----------
MyVM1     Microsoft Windows Server 2008 R2 (64-bit)
MyVM2     Microsoft Windows Server 2008 R2 (64-bit)
MyVM3     Microsoft Windows Server 2008 (64-bit)
MyVM4     Microsoft Windows Server 2008 R2 (64-bit)

Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine

I’ve come across this error a couple of times in the past few weeks when migrating old ASP.NET websites to new web servers so I’m popping it into the blog as an aide-memoire for myself and in case it’s useful for others.

The error message below (“Server Error in … Application”, “The Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine) pops up when trying to open a page which uses the database (in this case a Microsoft Access DB).

2017-06-16

The fix is to enable 32-bit applications for the relevant Application Pool using Internet Information Services Manager.  The Jet drivers are not 64-bit, and by default IIS8 (Server 2012R2) has 32-bit apps disabled.

  1. Open IIS Manager
  2. Navigate to the Application Pools Node underneath the web server.
  3. Select the App Pool in question. If in doubt look at the “Applications” column, if only one has any applications in it then that’s the one you want 🙂
  4. On the Actions menu on the right-hand side click on “Advanced Settings”
  5. In the “Advanced Settings” dialog set the value of “Enable 32-Bit Applications” to True and click OK.

2017-06-16 (1)

Microsoft Future Decoded Banner

Microsoft Future Decoded 2015

November 2015 saw the return of Microsoft’s Future Decoded event to the ExCel Center in London. I didn’t make it last year (it was a week after TechEd Europe and I was all Microsofted out!) so I’ve been looking forward to the Tech Day of this event since the registration notice back in May. This is my summary of the day. Continue reading