Ch Hassan

Ch Hassan

  • NA
  • 78
  • 3.9k

Basic authentication error on iis

Apr 12 2014 2:28 AM
when i remove endpoint working fine but when i host on iis getting an error
Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.
 
config is given is given below
<?xml version="1.0"?>
<configuration>

<system.web>
<authentication mode="Windows" />
</system.web>
<location>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<basicAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>

<services>
<service name="WSOnlineSales.ClientSale" behaviorConfiguration="metadataBehavior">

<!--<endpoint address="" binding="basicHttpBinding" bindingConfiguration="Binding1"
contract="WsServiceContract.IClient">
</endpoint>-->

</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="metadataBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

</configuration>
 
when i uncomment my contract then getting an error which is given below

Security settings for this service require 'Basic' Authentication but it is not enabled for the IIS application that hosts this service.

 

Answers (1)