Last post Jun 04, 2007 08:26 AM by SKT_01
May 28, 2007 09:22 AM|mobee|LINK
How dow we make sure that cookies are correctly set on various Mobile Phones and Mobile devices.
We are using Asp.Net ver 2.0
Mobile Web form
Mobile Web Forms Visual Studio 2005
MOBILE Web form DEVICES
ASP.NET Mobile Controls
May 28, 2007 10:32 AM|SKT_01|LINK
For which purpose do you need cookies?
May 28, 2007 10:43 AM|mobee|LINK
We need to recognize a user who has already visited our Mobile/WAP site earlier and not ask the user to login everytime.
May 28, 2007 12:23 PM|SKT_01|LINK
with cookie support you have to make sure that they are configured appropriate.
May 28, 2007 01:51 PM|mobee|LINK
We would like to set the location value for each user so that relevant information is displayed. It is not for authentication.
We only want cookies to be set when the device allows it. We had modified the web.config accordingly for cookieless=false but the cookies are not getting set on mobile devices. How do we make sure that the cookie has been set properly. Also is there any
limitation for the key value, length etc. for Mobile devices
May 28, 2007 02:07 PM|SKT_01|LINK
Some mobile devices do not allow multiple values for cookies. Therefore you have to use a separate cookie for each value.
May 28, 2007 02:15 PM|mobee|LINK
Our problem is that even when the device allows cookies, the location value (single key) is also not getting set. What would be the correct way or code to set the cookie on Mobiles? Is it any different from the Web?
May 29, 2007 02:28 AM|SKT_01|LINK
There is no difference between web and mobile applications concerning the writing of cookies.
Are you testing with emulators on localhost or real devices? If you use an emulator under localhost cookies might not be set. Perhaps you can show your code and it would be helpfull to know something about your concept. Do you want to store a GPS Location
in a cookie?
May 29, 2007 03:22 AM|mobee|LINK
We are testing with real devices, but the cookies are not getting set.
ctrCookie = New HttpCookie("mv")
ctrCookie.Value = "DL"
ctrCookie.Expires = System.DateTime.MaxValue
How can we get the GPS location?
May 29, 2007 03:41 AM|SKT_01|LINK
If you do not mean the GPS location what kind of "location" do you mean?
I am not sure if the value corresponding to System.DateTime.MaxValue in your code, i. e. 23:59:59.9999999, December 31, 9999 , will be accepted by mobile browsers.
You can also post your URL or send me the link so that we can see what the server is sending to the client.
May 29, 2007 11:32 AM|mobee|LINK
By authentication we mean that "all we need to know is that this user has visited earlier". Also location here means the city the user selects from the website once & thereafter all information for that city is made default for the user. If we can store
GPS location that would be even better. We would try changing the System.DateTime.MaxValue and then test
as you suggested
Jun 04, 2007 08:26 AM|SKT_01|LINK
The WAP Gateway or Proxy has also to support cookies.
GPS location is only available with special phones and special services.