我用這對嘗試登錄,在ASP.NET C#4.5 LDAP如果我試圖用這個,我不能什麼都不訪問(對於拒絕用戶=?)ASP.NET 4.5 C#的Active Directory拒絕訪問
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="Login.aspx" defaultUrl="Default.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile" domain="" />
</authentication>
<authorization>
<deny users="?"/>
<allow users="*" />
</authorization>
<membership defaultProvider="ADConnection">
<providers>
<add name="ADConnection" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionProtection="Secure" connectionStringName="ADConnection" connectionUsername="cpdprt01" connectionPassword="prt2016" attributeMapUsername="sAMAccountName"
enableSearchMethods="false"/>
</providers>
</membership>
任何解決方案嘗試阻止導航其他頁面沒有驗證?我可以登錄這個數據,但我不能阻止沒有驗證連接)
我不太明白。你的意思是未認證的用戶仍然可以訪問該網站嗎? –
完全困惑,請儘量簡單 –
@GabrielLuci對不起,我的英語。 我試圖解釋... 如果我使用這個配置,沒有人可以訪問我的網站,但是如果我刪除該行所有用戶都可以訪問我的網站。 登錄控件正常工作。我的問題是授權 –