WCF 服务 - 配置 Web 服务绑定异常

WCF Services - Configuration web service binding exception

全部,

环境: Asp.net4.0

IIS 7(或更高版本)

SL 组件使用的 WCF 服务

身份验证: Anonymous/Forms

当我尝试浏览我的 WCF Web 服务(使用浏览器)时,我的 Web 服务出现以下异常,我需要消除此错误:

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.

我查看了所有相关帖子,其中 none 对我有帮助。 我没有为我的服务使用任何身份验证或 user/pwd 传输。 我需要开始工作的服务由 Silverlight 组件使用,并且在 web.config 文件中具有此名称: Htmls.WebStore.Services.WebStoreServices(忽略其他服务)。

这是我的 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" />

异常是由于 xxxxx.svc 文件所在文件夹的权限不正确造成的。该文件夹已使用安全权限锁定。