ASP.NET Form Authentication with Android Browser

I use ASP.NET Forms Authentication in a simple way. Authentication uses a cookie to store credentials.

Works well in browsers: Desktop: Chrome, Safari, IE, ... Mobile: iPhone, Opera Mobile browser ...

I use button form authentication and redirect to the application page.

BUT, in the Android browser, I press the button and nothing.

ASP.NET Forms authentication configuration is simple:

<authentication mode="Forms">
 <forms loginUrl="MLogin.aspx"
     timeout="30"
     name=".MOBAUTH"
     path="/"
     defaultUrl="Main.aspx"
     cookieless="AutoDetect">
  <credentials passwordFormat="Clear">
   <user name="dev" password="123456"/>
  </credentials>
 </forms>
</authentication>
<authorization>
 <deny users="?" />
</authorization>

Does anyone know what could happen?

Complementing ...

MLogin.aspx uses a simple method to authenticate a user:

private void authenticate()
{
    if (FormsAuthentication.Authenticate("dev", this.txtPass.Text.Trim()))
        FormsAuthentication.RedirectFromLoginPage("dev", true);

    Response.End();
}
+3
source share
2 answers

Response.End(). . .

Response.End() . , , .

+1

"expires" Set-Cookie , . , cookie , .

0

Source: https://habr.com/ru/post/1773846/


All Articles