Monday, June 17, 2013

IIS 8 in Windows 8 - HTTP Error 500.19 - Internal Server Error when hosting ASP.Net and WCF

Upgrading our .Net applications from one environment to another is always painful. Even if its a upgrade from the Windows operating system version or the upgrade of .Net framework version. Basically it should be done in the development environment first and then in the QA environment. Also before performing upgrade in the development environment the developers should be having enough knowledge about the differences between existing plan form and new plat form. Also they need to cross verify what all features will be affected by the changes and should plan the mitigation.

Being said all those theories, its not practical always to do upgrade after all these analysis in tight scheduled projects. Recently I had to look into such a plan less upgrade of a .net application from Windows 7 to Windows 8 and below is the error which I got when browsing WCF services hosted in IIS8 . The upgrade was done first in QA environment ie they simply installed the MSIs in Windows 8 environment and the dev team is informed when error happened.

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
   IIS Web Core
   Not yet determined
Error Code
Config Error
   This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File
   \\?\C:\Program Files (x86)\...\web.config
Requested URL
Physical Path
   C:\Program Files (x86)\...\dataservice.svc
Logon Method
   Not yet determined
Logon User
   Not yet determined
Config Source:
  835:     <validation validateIntegratedModeConfiguration="false" />
  836:     <handlers>
  837:       <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
More Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

Normally this application is installed in pre configured OS images as it requires so many prerequisites. In this case the image for Windows 8 was not created which means all the prerequisites and settings needs to be done manually.


This specific error routes to the locked HttpHandlers. To get more idea about locking features we should know about IIS feature delegation. We need to go IIS8 manager and point the sever node and select feature delegation.There we could see that the http handerls are locked. Allowing edit option will solve this issue. 

It didn't actually solved our issue instead it showed subsequent issue. In that Win 8machine ASP.Net and WCF was not registered with IIS 8 :-(

No comments: