I have published a WCF service (MyService.svc
) on an ASP.NET site, in a sub-folder called WebServices
.
When running on the local ASP.NET web server it works fine. When published to an IIS-run site and I try to access, for example, /WebServices/MyService.svc/jsdebug
, I get 401 Unauthorized
. The rest of the site works fine.
Does anyone have any idea why?
Here are the contents of MyService.svc
:
<%@ServiceHost
Language="C#"
Debug="true"
Service="MyApp.Core.MyService, MyApp.Core"
Factory="System.ServiceModel.Activation.WebScriptServiceHostFactory"
%>
MyApp.Core.MyService
is a class implementing IMyService
(which has the attribute ServiceContract
and method declarations with the attribute OperationContract
).