I'm using ASP.NET Forms Authentication with a simple way. The authentication use a cookie for store the credentials.
Works perfectly in browsers like: Desktop: Chrome, Safari, IE, ... Mobile: iPhone Browser, Opera Mobile ...
I press the button form's authentication and i redirect to the app page.
BUT, in Android browser i press the button and nothing.
The configuration of ASP.NET Forms Authentication 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 have any idea what might be happening?
Complementing...
MLogin.aspx use a simple method for authenticate the user:
private void authenticate()
{
if (FormsAuthentication.Authenticate("dev", this.txtPass.Text.Trim()))
FormsAuthentication.RedirectFromLoginPage("dev", true);
Response.End();
}
The reason is the Response.End(). That function prematurely kills your stream of data. There is no need for it at all.
Different browsers handle the Response.End() in different ways. Some will render the page even though you ended the stream, and some will not render it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With