为什么Umbraco在我登录后运行App\u Data\Temp\Razor\inline-xxxx.cshtml注销控制?

为什么Umbraco在我登录后运行App\u Data\Temp\Razor\inline-xxxx.cshtml注销控制?,razor,forms-authentication,umbraco,appdata,Razor,Forms Authentication,Umbraco,Appdata,我的Umbraco网站有两种会员类型。我制作了一个自定义登录表单,用于检查凭据和验证成员。这是我的Umbraco剃须刀控制代码,用于: @using umbraco.MacroEngines; @{ if (Request.HttpMethod.ToLower() == "post") { if (!string.IsNullOrEmpty("username") && !string.IsNullOrEmpty("password"))

我的Umbraco网站有两种会员类型。我制作了一个自定义登录表单,用于检查凭据和验证成员。这是我的Umbraco剃须刀控制代码,用于:

@using umbraco.MacroEngines;

@{
    if (Request.HttpMethod.ToLower() == "post")
    {
        if (!string.IsNullOrEmpty("username") && !string.IsNullOrEmpty("password"))
        {
            string username = Request["username"];
            string password = Request["password"];
            var isValid = Membership.ValidateUser(username, password);
            if (isValid)
            {
                FormsAuthentication.SetAuthCookie(username, true);

                //FormsAuthentication.RedirectFromLoginPage(username, true);
                Response.Redirect(new DynamicNode(2431).Url, true);
            }

        }
    }
}
对于其中一种成员类型,身份验证工作正常。另一方面,在对成员进行身份验证后,Umbraco会运行script\App_Data\TEMP\Razor\inline-6ff314cb99b9da178f3b2d31bc709e.cshtml。该脚本具有以下代码:

@{
        FormsAuthentication.SignOut();

        // Drop all the information held in the session
        Session.Clear();
        Session.Abandon();

        // clear authentication cookie
        HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, "");
        cookie1.Expires = DateTime.Now.AddYears(-1);
        Response.Cookies.Add(cookie1);

        // clear session cookie
        HttpCookie cookie2 = new HttpCookie("ASP.NET_SessionId", "");
        cookie2.Expires = DateTime.Now.AddYears(-1);
        Response.Cookies.Add(cookie2);

        // Redirect the user to the login page
        Response.Redirect("login.aspx", true);
  }
当然,触发此脚本后,我的成员将注销。为什么会触发此脚本以及如何停止它


我当前的Umbraco版本是4.11.3。我想重要的一点是,它以前是4.7.0,我升级了。

问题不在Umbraco或会员中。它与我的自定义成员对象相关