Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のコードを使用して、ユーザーをページにリダイレクトしています。
Session["USERDATA"] = user; if (roleName.Equals("Zerker", StringComparison.CurrentCulture)) Response.Redirect("~/Account/Dashboard.aspx");
しかし、これがエラーの原因です。
このコンテキストでは応答を利用できません。
私は何をすべきか?
独自のクラスで応答オブジェクトを使用していると思います。このオブジェクトはそこでは利用できません。
使ってみて
HttpContext.Current.Response.Redirect("~/Account/Dashboard.aspx");