Security settings for this service require ‘Anonymous’ Authentication but it is not enabled for the IIS application that hosts this service.
This error occurred, because I had an endpoint configured in mine wcf service web.config with a identity tag, as shown below:
<endpoint address="" binding="wsHttpBinding" contract="Tpp.Pegaso.MaintenanceService.IMaintenanceService"> <identity> <dns value="localhost"/> </identity> </endpoint>
This identity element should be removed or replaced to reflect the identity under which the deployed service runs. If removed, WCF will infer an appropriate identity automatically.
To avoid disclosing metadata information, I set the serviceMetadata httpGetEnabled to false:
and removed the mex endpoint:
<endpointaddress="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>