Override ASP.NET forms authentication for a single page

前端 未结 3 2055
长情又很酷
长情又很酷 2021-02-10 00:16

In our ASP.NET MVC application, we automatically redirect users to a log-on page via the section of when they

3条回答
  •  感情败类
    2021-02-10 00:57

    Had a similar case where I needed to return back something that triggered an undesired redirect (basically a message about how authentication failed and it was redirecting to the login screen without the error information).

    This solved the problem:

    Response.SuppressFormsAuthenticationRedirect = true;
    

提交回复
热议问题