IIS 7 : HTTP 500 Internal Server Error/Machine.Config Files

I recently ran into an issue while assisting my company’s web developers with a site that would not load. The general error was HTTP 500 Internal Server Error.

The site in question, had recently been copied from a staging server to a production server. While it worked in staging, it did not load in production. I logged into the production server to get more detailed information by loading the page in IE. IE threw the following message:

2015-11-12 15_46_03- - Remote Desktop Connection

This particular site runs on Server 2008 and the application was built for ASP.net 1.1. After doing some research and thanks to http://www.iis.net I found the answer. It was determined that the machine.config files did match up in staging and production.

Per IIS.net —

ASP.NET v1.1 will throw runtime exceptions out of the box if you have IIS configuration in the web.config files that are read by your ASP.NET v1.1 applications. To make ASP.NET v1.1 ignore IIS configuration sections, open the Framework v1.1 machine.config file (%windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config) and add the following section entry just above the bottom tag for the element:

<section name=”system.webServer” type=”System.Configuration.IgnoreSectionHandler,
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ />

I added the aforementioned line to my machine.config file (C:\Windows\Microsoft.Net\Framework\v1.1.4322\Config) in production, the site now loads. Lesson learned. Always verify the machine.config files in both locations.


Lync/Skype for Business Certificate Error

File this under tips and tricks:

You are an Office 365 subscriber and trying to launch the Lync or Skype for Business client application. When attempting to login you receive the following error…

This happens due to server authentication failure. But you can set the server settings manually. Go to Tools -> Options -> Personal -> Select Manual Configuration -> Enter: sipdir.online.lync.com:443 -> Click OK -> Click OK on the Options window.

Go back to the login screen and enter your credentials. Usually this is your email address.

Now you should be able to successfully login.

If you still encounter issues, try using the Microsoft Remote Connectivity Analyzer.


Windows 2012R2 – Interactive Services Detection Error: Incorrect Function

Today’s head scratcher? I encountered this error today when trying to restart a service on Windows Server 2012 R2. The service, which controls an application licensing feature, triggered the error:

The Interactive Services Detection service terminated with the following error: Incorrect function.

Huh. The fix? Open the registry. Browse to HKLM -> System -> CurrentControlSet ->Control -> Windows -> NoInteractiveServices. Change the DWORD value for NoInteractiveServices from 1 to 0. Try restarting the service that depends on Interactive Services Detection. You should be successful.

The Windows 10 VPN Client and IPv4 Settings

As soon as Windows 10 RTM was released, a large number of people at my company were asking to be upgraded. Unfortunately, we did not have time to troubleshoot all the potential issues we might encounter. One thing we discovered still lingering from the last preview build was that you cannot edit the IPv4 settings inside of a vpn profile.

We usually un-check the box under advanced IPv4 properties labeled “Use default gateway on remote network” so that employees can funnel internet access through their local gateway while connected to the company vpn. Hopefully, this will be resolved in a coming update or service pack.

In the meantime, we’re setting up vpn connections using Powershell. Here’s my script to add a vpn profile using MSCHAPv2 for authentication, SSTP as the vpn connection type, and enabling split tunneling (same as un-checking the default gateway box):

In PowerShell —

Add-VPNConnection -Name vpn connection name -ServerAddress vpn servername  -TunnelType SSTP -EncryptionLevel Optional -AuthenticationMethod MSChapv2 -SplitTunneling -AllUserConnection -UseWinLgonCredential -PassThru

There are many other vpn client cmdlets available to customize your connection. Visit: https://technet.microsoft.com/en-us/library/jj554820(v=wps.630).aspx to view a complete list.