I have never deployed a WCF service for IIS 6. I have a service that I deploy to IIS 6 using the default configuration as part of a WCF project. I have so simplified the configuration, which could be a problem. Here is the error I get if I go to the service in the browser:
HTTP Error 403.1 - Forbidden: Access denied.
Now my configuration is as follows:
<system.serviceModel> <services> <service name="MyCompany.WebServices.MyService"> <endpoint address="" binding="basicHttpBinding" contract="MyCompany.WebServices.IMyService" /> </service> </services> </system.serviceModel>
If I try to add it as a reference in ASP.NET MVC, I get the following:
An error occurred while loading ' http://ws.mycompany.com/MyService.svc '. Request failed with HTTP status 403: Forbidden. The metadata contains the link cannot be resolved: ' http://ws.mycompany.com/MyService.svc '. An HTTP request was denied by the 'Anonymous' client authentication scheme. Remote Server Error: (403) Forbidden. If the service is defined in the current solution, try building the solution and adding a service link again.
Any ideas what could happen?
UPDATED:
This seems to be a configuration problem in my IIS 6 box. I would suggest this because I created a completely new ASP.NET 3.5 WCF application and deployed it to the new URL at http://ws.unitedoneresources.com/Service1.svc If I try to call this service, I get the same HTTP error as above. The entire service configuration is as follows:
<system.serviceModel> <services> <service name="WcfService1.Service1" behaviorConfiguration="WcfService1.Service1Behavior"> <endpoint address="" binding="wsHttpBinding" contract="WcfService1.IService1"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="WcfService1.Service1Behavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>
Again, this is a completely new ASP.NET 3.5 WCF application, so I have not changed anything in the project itself.
source share