How to deploy WCF service on IIS 6.0

I have IIS 6.0 on Windows Server 2003.

I installed .NET 3.5 and 4 beta 2. The "normal" ASP objects work (excellent). But when I try to go to my service ( /myServer/MyService.svc ), I get 404. The page was not found.

To be precise, I got 404 2 "The Web Services Extension Blocking Policy prevents this request."

I used ServiceModelReg.exe /ia to verify that the extension I knew, 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'm still getting 404-2.

+6
deployment wcf iis-6
source share
3 answers

Your Web Services Extension Blocking Policy prevents your ASP.NET 4.0 ISAPI request from processing. This happened to me, check this 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 

You have a "0" next to v4.0 aspnet_isapi.dll, like me? Your problem is there. 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 information about the iisext.vbs tool: http://support.microsoft.com/kb/328419/

+7
source share

Can you show us your server web.config (only the <system.serviceModel> section)? Where does your service work on your server?

When hosted on IIS, your business address is determined by:

  • server name (or IP address)
  • name of the virtual directory (plus any subdirectories below it) in which your * .svc file lives
  • * .svc file itself

So it would be something like:

 http://YourServer/YourVirtualDirectory/MyService.svc 

It seems you are not using the virtual directory in the path you specified - is your .svc file really located in the root directory of the web server, or did you forget to add the virtual directory to your path?

+2
source share

The information on this blog turned out to be invaluable to make it work.

http://xamlcoder.com/blog/?p=7

I'm not sure about IIS6, but I created a new website in IIS7 (I couldn't get things to work in a virtual directory, but this is probably a lack of IIS knowledge). I put my .svc file in the root directory and in ~ / Services /

It all started perfectly.

The blog mentions that IIS should look in ~ / Services / automatically at any time when the .svc file is filed, but this does not work. This is why I just copied the .svc file to the root directory of the site.

Hope this helps.

+1
source share

All Articles