Trying to get my WCF service running under IIS 6.
I have created the .svc
and aspnet_isapi.dll
mapping according to: http://msdn.microsoft.com/
There are two things I can think of:
The .svc extension is not correctly set up (least probable according to your description). You can check this post for more details.
Or your web site has multiple host headers. To resolve this issue, you must have a single host header or use a factory. Here’s an example:
namespace MyNamespace
{
public class MultipleHostServiceFactory : ServiceHostFactory
{
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
List addresses = new List();
addresses.Add(baseAddresses[0]);
return base.CreateServiceHost(serviceType, addresses.ToArray());
}
}
}
Next, you need to set the factory in the markup of your .svc file:
<%@ ServiceHost Language="C#"
Debug="false"
Factory="MyNamespace.MultipleHostServiceFactory"
Service="MyNamespace.MyService"
CodeBehind="MyService.svc.cs" %>