Wednesday, March 2, 2011

Enabling WCF support in SharePoint 2007 on Windows 2008 R2 IIS7

Installing SharePoint 2007 on Windows Server 2008 R2 sets SharePoint IIS application pools to Classic mode. In context of WCF this means that you have to manually configure WCF support in Web Applications web.configs. Otherwise you will get 404 errors trying to access any .svc files in your application.

In order to enable WCF support to SharePoint 2007 installed on Windows Server 2008 R2 with IIS 7.5, you have to put the following records to the web.config:

<system.webServer>
<handlers>
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
<add name="svc-ISAPI-2.0-64" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
</handlers>
</system.webServer>

P.S.: It is probably the case with any web application runing in classic mode in IIS7.

No comments:

Post a Comment