Asp.net 为什么';是否调用我的serviceAuthenticationManagerType进行基本身份验证?
我正在使用WCF OData服务,并尝试使用基本身份验证。当我在web浏览器中浏览我的OData服务时,我会得到用户名/密码提示。但是,当我输入用户名和密码时,不会调用自定义serviceAuthenticationManagerType,登录失败。我有什么配置错误吗Asp.net 为什么';是否调用我的serviceAuthenticationManagerType进行基本身份验证?,asp.net,wcf,Asp.net,Wcf,我正在使用WCF OData服务,并尝试使用基本身份验证。当我在web浏览器中浏览我的OData服务时,我会得到用户名/密码提示。但是,当我输入用户名和密码时,不会调用自定义serviceAuthenticationManagerType,登录失败。我有什么配置错误吗 <system.serviceModel> <bindings> <webHttpBinding> <binding name="basicHttp">
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="basicHttp">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="dataServiceBehavior">
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceAuthorization principalPermissionMode="Custom">
<authorizationPolicies>
<add policyType="WcfResearch.AuthorizationManagers.WcfResearchAuthorizationPolicy, WcfResearch.AuthorizationManagers" />
</authorizationPolicies>
</serviceAuthorization>
<serviceAuthenticationManager authenticationSchemes="Basic" serviceAuthenticationManagerType="WcfResearch.AuthorizationManagers.WcfResearchAuthenticationManager, WcfResearch.AuthorizationManagers"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="WcfResearch.WcfDataService1" behaviorConfiguration="dataServiceBehavior">
<endpoint binding="webHttpBinding" bindingConfiguration="basicHttp" contract="System.Data.Services.IRequestHandler" />
</service>
</services>