none
WCF service not working on IIS6 2003 server RRS feed

  • Question

  • Hi,

    I got a WCF service that is using the "System.ServiceModel.Activation.WebServiceHostFactory". The service Works on a Windows 2008 server running IIS7. But on Windows Server 2003 R2 with IIS6 it doesn't.

    The service is a rest kinda service returning JSON.

    The website loads my service - I can see logging from the service static constructor. But after that I just get "webpage could not be loaded" from IE. Nothing in eventlog.

    Any ideas?

    --
    Werner

    Wednesday, September 11, 2013 1:58 PM

All replies

  • Hi,

    First please make sure that aspnet_isapi is enabled as a Web service extension for IIS. We can view and modify this setting using IIS Manager, or by running aspnet_regiis –I –enable from the .NET Framework installation directory.

    Then please make sure that the .svc file type is mapped to aspnet_isapi.dll.

    The following tells how to verify that the svc file type is mapped to be handled by aspnet_isapi.dll in IIS 6.0, please try to check it:

    1. Open Computer Management in Control Panel.

    2. Expand Services and Applications, Internet Information Services.

    3. Right-click Web Sites and select Properties.

    4. On the Home Directory tab, click Configuration.

    5. In the list of application mappings, verify that the .svc file is mapped to the aspnet_isapi.dll. If the file has not been mapped:
    a.Click Add.
    b.In the Add/Edit Application Extension Mapping dialog box, click Browse.
    c.Browse to the folder that contains the aspnet_isapi.dll, and click Open.
    d.Specify .svc as the extension.
    e.Make sure Check that file exists is unchecked.
    f.Click OK, and OK again to return to the Web Sites Properties dialog box.

    6. Click OK to close the dialog box.

    For more information, please try to refer to:

    #IIS Hosted Service Fails:
    http://msdn.microsoft.com/en-us/library/ms752252(v=vs.85).aspx .

    #WCF SVC – Page not found (Under Windows 2003 IIS 6):
    http://zeetalks.wordpress.com/2012/05/16/wcf-svc-page-not-found-under-windows-2003-iis-6/ .

    Best Regards,
    Amy Peng

     


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, September 12, 2013 2:07 AM
    Moderator
  • Hi Amy,

    Thanks, but you might have missed that the service does load => the .svc file is executed. In a static constructor of my service class I'm logging something. So the class is loaded. But I just checked and ".svc" is mapped to "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" which also exists (this is a 32 bit server).

    I have tried to attach a debugger but there is no exception happening. It just stops serving the request apparantly. Not with a timeout - the "Webpage can't be displayed" message comes very quickly.

    Perhaps there are some way to have WCF log stuff?

    --
    Werner


    Thursday, September 12, 2013 9:52 AM