Last post Oct 07, 2011 03:20 AM by Joanna_D
Sep 16, 2011 10:05 AM|Joanna_D|LINK
writing asp.net 4 web app (c#), that should be also usefull on phones / smartphones.
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);
Did any one experiened similar problem? Any Ideas?
Thanks in advance
Sep 16, 2011 12:18 PM|roopeshreddy|LINK
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...
Sep 19, 2011 04:05 AM|Joanna_D|LINK
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.
Sep 20, 2011 06:26 AM|Joanna_D|LINK
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?
Sep 24, 2011 11:45 AM|roopeshreddy|LINK
Do check the below link,
The above link addresses the problem with Nokia browsers too!
Oct 07, 2011 03:20 AM|Joanna_D|LINK
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!