Wcf – How to deploy WCF service on IIS 6.0

deploymenthttp-status-code-404iis-6wcf

I have IIS 6.0 on Windows Server 2003.

I installed .NET 3.5 and 4 beta 2. "Normal" ASP things are working (perfect). But when I try to navigate to my service (/myServer/MyService.svc) I get a 404. Page not found.

To be exact, I got a 404 2 "Web service extension lockdown policy prevents this request."

I used ServiceModelReg.exe /ia to make sure that the extension I known and I checked the configuration using:

admin-Tools, iis, home-tab, configuration, executable-box, and there:

Extension: .svc, path: c:\windows\microsoft.net\framework\v4.0.210..., verbs: all verbs.

So everything seems OK. But I still get a 404-2.

Best Answer

Your "web service extension lockdown policy" is preventing the ASP.NET 4.0 ISAPI extension from processing your request. It happened to me, check it out:

C:\>cscript c:\WINDOWS\system32\iisext.vbs /ListFile
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Connecting to server ...Done.

Status / Extension Path
------------------------
0  C:\WINDOWS\system32\inetsrv\httpodbc.dll
0  C:\WINDOWS\system32\inetsrv\ssinc.dll
0  C:\WINDOWS\system32\inetsrv\asp.dll
1  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
0  *.exe
0  C:\WINDOWS\system32\inetsrv\httpext.dll
0  *.dll
1  C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll
1  C:\WINDOWS\system32\MQISE.DLL
0  C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll

Do you have a "0" next to the v4.0 aspnet_isapi.dll like I did? There's your problem. You need to enable it:

C:\>cscript c:\WINDOWS\system32\iisext.vbs /EnFile C:\WINDOWS\Microsoft.NET\Frame
work64\v4.0.30319\aspnet_isapi.dll
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Connecting to server ...Done.
Enabling extension file complete.

For more info on the iisext.vbs tool: http://support.microsoft.com/kb/328419/