[英]Security setting for WCF service requires anonymous authentication
我正在嘗試創建WCF服務,但出現以下錯誤。 錯誤:此服務的安全服務需要匿名身份驗證。 我發現了類似的問題,但是他們的解決方案對我不起作用。
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="CMSUI.DataServiceAspNetAjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service name="CMSUI.DataService" >
<endpoint address="" behaviorConfiguration="CMSUI.DataServiceAspNetAjaxBehavior"
binding="webHttpBinding" contract="CMSUI.DataService" />
</service>
</services>
謝謝您的幫助。
我暫時在iis中啟用了匿名訪問,並在web.config中禁用了匿名訪問。 它解決了我的問題。
web.config
<authorization>
<deny users="?" />
<allow users="*"/>
</authorization>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.