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?
Joanna_D
Member
7 Points
4 Posts
Authentication problems on Symbian with asp 4.0
Sep 16, 2011 02:05 PM|LINK
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
roopeshreddy
All-Star
20155 Points
3328 Posts
Re: Authentication problems on Symbian with asp 4.0
Sep 16, 2011 04:18 PM|LINK
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...
Roopesh Reddy C
Roopesh's Space
Joanna_D
Member
7 Points
4 Posts
Re: Authentication problems on Symbian with asp 4.0
Sep 19, 2011 08:05 AM|LINK
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.
Joanna_D
Member
7 Points
4 Posts
Re: Authentication problems on Symbian with asp 4.0
Sep 20, 2011 10:26 AM|LINK
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?
roopeshreddy
All-Star
20155 Points
3328 Posts
Re: Authentication problems on Symbian with asp 4.0
Sep 24, 2011 03:45 PM|LINK
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...
Roopesh Reddy C
Roopesh's Space
Joanna_D
Member
7 Points
4 Posts
Re: Authentication problems on Symbian with asp 4.0
Oct 07, 2011 07:20 AM|LINK
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!