Search code examples
asp.netwcfiis-7.5wcf-binding

WCF Services - Configuration web service binding exception


All,

Env: Asp.net 4.0

IIS 7 (or greater)

WCF service consumed by SL component

Authentication: Anonymous/Forms

When I attempt to browse to my WCF web service (using browser) I get the following exception on my web service, I need to get rid of this error:

The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'BasicHttpBinding' ('Anonymous'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement.

I looked at ALL related posts and none of them help me. I am not using any authentication or user/pwd transmission for my service. The service I need to get working is consumed by Silverlight component and has this name in web.config file: Htmls.WebStore.Services.WebStoreServices (ignore the other service).

Here's my web.config:

<system.serviceModel>
<bindings>
  <basicHttpBinding>
            <binding name="WebStoreServices_InsecureTransport" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
                <readerQuotas maxDepth="4096" />
                <security mode="None" />
            </binding>
    <binding name="basicHttpBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
      <security mode="None" />
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <endpointBehaviors>
    <behavior name="SitefinityWebApp.Sitefinity.Services.Content.EventsAspNetAjaxBehavior">
      <enableWebScript />
    </behavior>
    <behavior name="EndpBehavior">
      <webHttp />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    <behavior name="Telerik.Sitefinity.Web.Services.LocalizationBehavior" />
    <behavior name="ServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
        <service name="Htmls.WebStore.Services.WebStoreServices">
            <endpoint address="" binding="basicHttpBinding" bindingConfiguration="WebStoreServices_InsecureTransport" contract="Htmls.WebStore.Services.IWebStoreServices" />
        </service>
  <service name="SitefinityWebApp.Sitefinity.Services.Content.Events">
    <endpoint address="" behaviorConfiguration="SitefinityWebApp.Sitefinity.Services.Content.EventsAspNetAjaxBehavior" binding="webHttpBinding" contract="SitefinityWebApp.Sitefinity.Services.Content.Events" />
  </service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />


Solution

  • The exception was caused by having incorrect permission on the folder where the xxxxx.svc file was. The folder was locked down using security permissions.