locked
Authentication problems on Symbian with asp 4.0 RRS feed

  • Question

  • User1323667 posted

    Hello,

    writing asp.net 4 web app (c#), that should be also usefull on phones / smartphones.

    Authentication for the user is required. I do use cookies (storing some additional data there ). After login on  my.site.com/login.aspx the user is redirected default to my.site.com/menu.aspx. It works fine on Android and iPhone/iPad.

    On Symbian ( S60 3.2) the user experiences:

    1. Typing my.site.com, will be shown Login page ( it's correct)

    2. put correct data on login.aspx, press login

    3. he is not correct redirected, cames back to login page with URL my.site.com/loginaspx?ReturnURL=%2fMenu.aspx

    We have allready checked, that validation of authentication is OK, connection to server and database works fine. So maybe there is some problem about not properly stored cookies, or ?

    But user has cookies turned on....

    Have searched while, but found nothing clear.

    Sample of code:

    ..... here goes account validation ... then Storing some add. data and redirecting
    
    Response.Cookies["UserData"]["Data1"] = somedata.Text.ToUpper();
    Response.Cookies["UserData"]["Data2"] = somedata2.Text.ToUpper();
    Response.Cookies["UserData"].Expires = DateTime.Now.AddDays(30);
    
     HttpCookie authCookie = FormsAuthentication.GetAuthCookie(oUserName, false);
                FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
                FormsAuthenticationTicket newTicket = new FormsAuthenticationTicket(ticket.Version, ticket.Name,
                 DateTime.Now, DateTime.Now.AddDays(1), ticket.IsPersistent, oUserDataString);
                authCookie.Value = FormsAuthentication.Encrypt(newTicket);
    
    Response.Cookies.Add( authCookie );
    string redirUrl = FormsAuthentication.GetRedirectUrl(oUserName, true);
    Response.Redirect(redirUrl);
    

    Did any one experiened similar problem? Any Ideas?

    Thanks in advance

    Friday, September 16, 2011 10:05 AM

Answers

All replies

  • User1943143334 posted

    Hi,

    It may be issue with the browser, since it is working in Apple iPhone. Android devices!

    Try to check it in the Opera Mini browser, which is available for Nokia devices!

    Hope it helps u...

    Friday, September 16, 2011 12:18 PM
  • User1323667 posted

    Hi roopeshreddy,

    thanks for idea, but we already checked on same phone with Opera Mini, and still not possible to redirect from login.

    Even if it would be OK with Operam, we can't force users to instal Opera. Should also be working on native producers browser.

    So i'm still looking for solution.

    Monday, September 19, 2011 4:05 AM
  • User1323667 posted

    Hi everybody

    I've managed to get to the point that it is something connected with  asp ver 4.0.

    On this same phone , same site, with asp 3.5 works fine ( user can login to service).

    With asp 4.0 there is no possible to login - user is redirected back to login page all time.

    Is this situation known to anybody?

    Tuesday, September 20, 2011 6:26 AM
  • User1943143334 posted

    Hi,

    Do check the below link,

    http://stackoverflow.com/questions/4158550/problem-with-asp-net-forms-authentication-when-using-iphone-uiwebview

    The above link addresses the problem with Nokia browsers too!

    Hope it helps u...

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 24, 2011 11:45 AM
  • User1323667 posted

    Hello,

    thanks! I was not answering fo r some time, cause involved in other project.

    But we checked the solution, and it works fine.

    So thanks again!

    Friday, October 7, 2011 3:20 AM