2012-01-31 97 views
0

我正在關注本教程http://blogs.msdn.com/b/astoriateam/archive/2010/07/21/odata-and-authentication-part-6-custom-basic-authentication.aspx。 我需要添加到Web.config:HTTP錯誤500.19 - 使用WCF數據服務的內部服務器錯誤身份驗證

<system.webServer> 
    <modules> 
    <add name="BasicAuthenticationModule" 
     type="SimpleService.BasicAuthenticationModule"/> 
    </modules> 
</system.webServer> 

,但我得到無法添加類型的重複的集合項「添加」具有獨特的關鍵屬性「名稱」設置爲「BasicAuthenticationModule」 所以,我搜索網對於一些解決方案,很多帖子建議增加這一行

<system.webServer> 
     <modules> 
     <remove name="BasicAuthenticationModule"/> 
     <add name="BasicAuthenticationModule" 
      type="SimpleService.BasicAuthenticationModule"/> 
     </modules> 
    </system.webServer> 

,但現在我得到一個「鎖定衝突」

任何幫助,請?

回答

0

嗯,它現在消失了,一切都很好。 起初,我不得不在IIS中禁用應用程序的所有身份驗證,但我必須執行系統還原,之後它就是所有的歷史記錄。 對不起,我忍不住。

相關問題