Lions Den

The Code and Times of Hanan Schwartzberg

About Hanan | Hanan's CV | Contact Hanan

April 18, 2010

IIS7.5 “HTTP Error 500.19 – Internal Server Error”

Filed under: IIS7 — Tags: , , , — Hanan Schwartzberg @ 10:33 pm

The symptom

After loading an ASP.NET web application on an IIS7.5 server, navigating to the site resulting in the following error:

HTTP Error 500.19 - Internal Server Error

The search for a cause and a solution

The first step was this Microsoft KB Article that breaks down the 500.19 error based on the HResult: Unfortunately, for the HResult above, 0x8007000d, the only cause listed is “a malformed XML elemen” in the web.config. After spending some time looking at the web.config I came to the conclusion there were no malformed tags.

The next solution I found was from JohnnyW on ASP.NET, JohnnyW’s error was evidently caused by Ajax not being properly installed. He includes this link on how to configure AJAX for ASP.NET. Since, due to some old controls we do require the AJAX 1.0 extensions to be installed I made the changes to the web.config it recommends, but still kept getting the same error.

I decided to manually hunt for the cause in the web.config and so I started to remove sections one at a time until the error disapeared and the site loaded.

The actual cause and soluion

The section that was actually causing the error was the rewrite section.

    <rule name="Redirect to www" stopProcessing="true">
      <match url=".*" />
        <add input="{HTTP_HOST}" 
            pattern="^$" />
        <add input="{HTTP_HOST}" 
            pattern="^$" />
        <add input="{HTTP_HOST}" 
            pattern="^$" />
      <action type="Redirect" 
          redirectType="Permanent" />

Searching for information on redirect rules led me to, where he explains you can use URL Rewrite “by installing the URL Rewrite Module.” This was what actually caused the 500.19 error. The server didn’t have the url rewrite module installed. I solved the issue by downloading the IIS URL Rewrite 2.0 from here: and installing it. Instantly the 500.19 error was cleared up.

Home | Site Design | Banner Design | Code Den | Offsite Posts | Downloads | Photography | About Hanan | Hanan's CV | Contact Hanan
Copyright © 2009 Hanan Schwartzberg. All rights reserved.