ASP.NET(2.0)ページにログインコントロールがあります。LoggingInイベントは次のように処理します。
protected void Login1_LoggingIn(object sender, LoginCancelEventArgs e)
{
// go to database and find this user
if (userTable != null && userTable.Rows.Count > 0)
{
int userID = Convert.ToInt32(userTable.Rows[0]["UserID"]);
HttpCookie userIdCookie = new HttpCookie("UserID", userID.ToString());
Response.AppendCookie(userIdCookie);
}
else
{
e.Cancel = true;
}
}
データベースでユーザーが見つかりました。そして、この関数の終わりに、e.Cancelはまだfalseに設定されています。しかし、その後、LoginErrorが発生しました。LoggedInは発生しませんでした。そして、FailureTextがページに表示されます。これをデバッグする方法がわかりません:(