Thursday, August 27, 2009

HTTP Error 500.19 - Internal Server Error

I came across the following issue in our application server when I tried to browse a WCF service resides under my WCF services virtual directory. The root cause of this issue is, handler section of an applicationHost.config file is set to “Deny”.


My application server is 64 bit machine and it has Windows Server 2008 (64 bit). I tried to host my WCF services in one our alternate application server (which has Windows Server 32 bit operation system) and it's working well in 32 bit environment.

The handler section of an applicationHost.config file is set to “Deny” only on Windows Server 2008 64 bit machine, whereas it's set as "Allow" on the Windows Server 2008 32 bit machine. Finally I did modify the applicationHost.config's handler section as “Allow” and it resolves the issue.

I was bit confused why the specific attibute is set as "Deny" on the 64 bit environment and tried to search forums relevant to the above issue. Unfornately I couldn't discover anything relevant to this issue.

To Relsove the above issue (in Windows Server 2008 environment) ,

  1. Browse to "C:\windows\system32\inetsrv\config" directory
  2. Copy applicationHost.Config file and paste it some other directoy (because you can't edit any files reside under "C:\windows\system32" folder)
  3. Open applicationHost.Config in NotePad and go to above section and change "Deny" to "Allow".
  4. Save applicationHost.Config file and close it.
  5. Copy the applicationHost.Config and paste it under "C:\windows\system32\inetsrv\config", choose "Copy and Replace".  

Wednesday, August 26, 2009

Prerequisites for hosting WCF Services in IIS 7.0

1. The following components are mandatory to host WCF services in IIS 7.0.

Common HTTP Features
Application Development
i.ISAPI Extensions
ii.ISAPI Filters
i.Windows Authentication
ii.URL Authorization
iii.IP and Domain Restrictions
Management Tools
i.IIS Management Console
ii.IIS 6 Management Compatibility

2. To check whether the above components are installed in your machine,

Go to Server Manager and then choose Roles under the Server Manager tree. Go to Role Service window on the right side pane and make sure the above components are installed.

3. If any of the above roles are missing choose the Roles node under the Server Manager tree, right click and then click the “Add Roles” menu. Add the appropriate roles from the Add Roles wizard.

4.Go to Server Manager and then choose Features under the Server Manager tree. Go to Features window on the right side pane and make sure the “WCF Activation” feature is installed as part of Windows Server 2008.

5. If the “WCF Activation” feature is not installed, right click on the Features node under Server Manager tree and then click Add Features menu. Expand the .NET Framework 3.0 Features node in the Add Features Wizard and Choose the WCF Activation feature by clicking the check box. Click Next on the wizard and then click “Install” button in the final step.