![](/img/trans.png)
[英].Net Core 5 Razor pages Cookie Authentication redirects to the login page after successful login
[英]Login Page redirects to login page after authentication against active directory
我正在嘗試針對活動目錄創建一個登錄頁面。 成功登錄后,它將重定向到登錄頁面。
這是代碼,我相信可能是罪魁禍首。
if (true == AuthenticateUser(domainName, uname, txtPassword.Text, adPath, out strError))
{
Response.Redirect("~/Home.aspx");
}
如果我使用不正確的憑據,則說明用戶名或密碼無效。 我應該在if {}塊中實現SetAuthCookie嗎?
我想到了。
在我的web.config文件中,那里的參數不正確。 我刪除了它們,添加了正確的,現在是正確的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.