problem in session management in mobile web application
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngmob' list.


Mayur Bapat
Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

Reply to this message...
 
    
Anil John
Mayur,

I was able to replicate the problems that you are having with the Nokia
7110. It would appear that the Nokia is one of those phones that do not
handle redirects well.

Try adding the following to your web.config file and try again (This worked
for me)

Anil

--------------

<!-- SESSION STATE SETTINGS
By default ASP .NET uses cookies to identify which requests belong
to a particular session. If cookies are not available, a session can be
tracked by adding a session identifier to the URL. To disable cookies, set
sessionState cookieless="true".
-->
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="true"
timeout="20"
/>

    <!-- USING REDIRECTS
Some mobile devices and and browsers require fully qualified URLs
in response to an http redirect. The following setting enables
this feature.
    -->

<httpRuntime useFullyQualifiedRedirectUrl="true" />

<!-- VIEW STATE HISTORY
To reduce bandwidth demand, view state in mobile controls is saved
as part
of a user's session on the server (as compared to on the client as
a
hidden form variable in web form controls). Because view state is
kept on
the server, it is possible for the current state to get out of
synch with
the current page in the browser if one uses the back button to go
back in
history. By default, history is set to 6, but can be tuned to the
application
by using the following tag.
-->
<mobileControls sessionStateHistory="6" />
---------------------------

Anil

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 10:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Simon Calvert
For cookieless=3Dtrue

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie=20

When cookieless=3Dfalse, you may have the case where the device/emulator
itself cannot handle cookies, and so will error out.=20

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]=20
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi=20

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless=3D"false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in =20
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless=3D"true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language=3D"c#" Codebehind=3D"myapp.aspx.cs"
Inherits=3D"myapp.MobileWebForm1"
AutoEventWireup=3D"false" %>
<%@ Register TagPrefix=3D"mobile"
Namespace=3D"System.Web.UI.MobileControls"
Assembly=3D"System.Web.Mobile" %>
<meta name=3D"GENERATOR" content=3D"Microsoft Visual
Studio 7.0">
<meta name=3D"CODE_LANGUAGE" content=3D"C#">
<meta name=3D"vs_targetSchema" content=3D"Mobile Web
Page">
<body xmlns:mobile=3D"Mobile Web Form Controls">
<mobile:Form id=3D"Form1" runat=3D"server"
title=3D"welcome">
<mobile:Label id=3D"labname" runat=3D"server">Enter
Name</mobile:Label>
<mobile:TextBox id=3D"txtName"
runat=3D"server"></mobile:TextBox>
<mobile:Command id=3D"but1"
runat=3D"server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id=3D"Form2" title=3D"welcome"
runat=3D"server">
<mobile:Label id=3D"labmsg"
runat=3D"server">Label</mobile:Label>
<mobile:Label id=3D"labemail" runat=3D"server">Enter
Email</mobile:Label>
<mobile:TextBox id=3D"txtEmail"
runat=3D"server"></mobile:TextBox>
<mobile:Command id=3D"btn2"
runat=3D"server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id=3D"Form3" runat=3D"server">
<mobile:Label id=3D"labfinal"
runat=3D"server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS=20
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text =3D "welcome " + txtName.Text;
ActiveForm =3D Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text =3D txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text =3D "Your emailid is " +
txtEmail.Text;
ActiveForm =3D Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
Sri
So What will happen if a user bookmarks the url (that has session ID in it)
and visits the site using that URL? Will he get an error??

-Sri

----- Original Message -----
From: "Simon Calvert" <Click here to reveal e-mail address>
To: "aspngmob" <Click here to reveal e-mail address>
Sent: Wednesday, March 27, 2002 5:33 PM
Subject: [aspngmob] RE: problem in session management in mobile web
application

For cookieless=true

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie

When cookieless=false, you may have the case where the device/emulator
itself cannot handle cookies, and so will error out.

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Anil John
I would assume that if the user is visiting the site outside the session
timeout window, the server recognizes that the session has expired and
starts a new session for you. So book marking should not be a problem.

Anil

-----Original Message-----
From: Sri [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 8:53 PM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

So What will happen if a user bookmarks the url (that has session ID in it)
and visits the site using that URL? Will he get an error??

-Sri

----- Original Message -----
From: "Simon Calvert" <Click here to reveal e-mail address>
To: "aspngmob" <Click here to reveal e-mail address>
Sent: Wednesday, March 27, 2002 5:33 PM
Subject: [aspngmob] RE: problem in session management in mobile web
application

For cookieless=true

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie

When cookieless=false, you may have the case where the device/emulator
itself cannot handle cookies, and so will error out.

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Sri
Thanks Anil, But thats not whats happening!
Here is an error message I received when I requstes a page after the session has ended...
Any clue?
THanks
Sri
System.Web.HttpException: Exception of type System.Web.HttpException was thrown. ---> System.IO.FileNotFoundException: G:\Inetpub\TVGOLWireless\(54ibhfzitu3232cjck55yrlwlu45)\Menu.aspx

at System.Web.UI.TemplateParser.GetParserCacheItem()

at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context)

at System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context)

at System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context)

at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path)

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)

--- End of inner exception stack trace ---

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)

at System.Web.MapHandlerExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

URL: http://www.xyz.com/(54ibhfzitu3232cjck55yrlwlu45)/Menu.aspx?__redir=1

----- Original Message -----
From: Anil John
To: aspngmob
Sent: Thursday, March 28, 2002 7:08 AM
Subject: [aspngmob] RE: problem in session management in mobile web application

I would assume that if the user is visiting the site outside the session
timeout window, the server recognizes that the session has expired and
starts a new session for you. So book marking should not be a problem.

Anil

-----Original Message-----
From: Sri [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 8:53 PM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

So What will happen if a user bookmarks the url (that has session ID in it)
and visits the site using that URL? Will he get an error??

-Sri

----- Original Message -----
From: "Simon Calvert" <Click here to reveal e-mail address>
To: "aspngmob" <Click here to reveal e-mail address>
Sent: Wednesday, March 27, 2002 5:33 PM
Subject: [aspngmob] RE: problem in session management in mobile web
application

For cookieless=true

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie

When cookieless=false, you may have the case where the device/emulator
itself cannot handle cookies, and so will error out.

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
    
Anil John
Hmm...

Does this happen in both IE and the emulator/device that you are working with?

I bookmarked an MMIT page with cookieless sessions turned on @:

http://www.kylas.com/(y3sozd45uopula2gfjoswfrl)/mdefault.aspx

Then killed my browser, waited 20+ minutes and used my bookmark without any problems. BUT, I tested in IE 6.0 not in a wap emulator/device.

I am at work right now and can't test with an emulator (minor problems with corporate firewall and authentication), but if someone has not given you a resolution by that time, I will replicate the test from home.

In the meantime, try replicating YOUR test with the URL above and see if it works. We can at least try to eliminate as many variables as possible.

Anil

---------- Original Message ----------------------------------
From: "Sri" <Click here to reveal e-mail address>
Reply-To: "aspngmob" <Click here to reveal e-mail address>
Date: Thu, 28 Mar 2002 08:29:02 -0500

Thanks Anil, But thats not whats happening!
Here is an error message I received when I requstes a page after the session has ended...
Any clue?
THanks
Sri
System.Web.HttpException: Exception of type System.Web.HttpException was thrown. ---> System.IO.FileNotFoundException: G:\Inetpub\TVGOLWireless\(54ibhfzitu3232cjck55yrlwlu45)\Menu.aspx

at System.Web.UI.TemplateParser.GetParserCacheItem()

at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context)

at System.Web.UI.TemplateControlParser.GetCompiledInstance(String virtualPath, String inputFile, HttpContext context)

at System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context)

at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String path)

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)

--- End of inner exception stack trace ---

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)

at System.Web.MapHandlerExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

URL: http://www.xyz.com/(54ibhfzitu3232cjck55yrlwlu45)/Menu.aspx?__redir=1

----- Original Message -----
From: Anil John
To: aspngmob
Sent: Thursday, March 28, 2002 7:08 AM
Subject: [aspngmob] RE: problem in session management in mobile web application

I would assume that if the user is visiting the site outside the session
timeout window, the server recognizes that the session has expired and
starts a new session for you. So book marking should not be a problem.

Anil

-----Original Message-----
From: Sri [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 8:53 PM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

So What will happen if a user bookmarks the url (that has session ID in it)
and visits the site using that URL? Will he get an error??

-Sri

----- Original Message -----
From: "Simon Calvert" <Click here to reveal e-mail address>
To: "aspngmob" <Click here to reveal e-mail address>
Sent: Wednesday, March 27, 2002 5:33 PM
Subject: [aspngmob] RE: problem in session management in mobile web
application

For cookieless=true

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie

When cookieless=false, you may have the case where the device/emulator
itself cannot handle cookies, and so will error out.

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

--
---------------------------------------------------------
- Anil John [Click here to reveal e-mail address]
- http://www.Kylas.com
- Connect with .net - Anytime. Anywhere.
---------------------------------------------------------
--

Reply to this message...
 
    
Anil John
Sri,

I just tried the the URL below with a Nokie 7110 emulator (I think that was
one you were using before) and had no problems with the sessionid in the url
or going back to a bookmarked url..

Do you have the following in your web.config?

<httpRuntime useFullyQualifiedRedirectUrl="true" />

Anil

-----Original Message-----
From: Anil John [mailto:Click here to reveal e-mail address]
Sent: Thursday, March 28, 2002 11:11 AM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

Hmm...

Does this happen in both IE and the emulator/device that you are working
with?

I bookmarked an MMIT page with cookieless sessions turned on @:

http://www.kylas.com/(y3sozd45uopula2gfjoswfrl)/mdefault.aspx

Then killed my browser, waited 20+ minutes and used my bookmark without any
problems. BUT, I tested in IE 6.0 not in a wap emulator/device.

I am at work right now and can't test with an emulator (minor problems with
corporate firewall and authentication), but if someone has not given you a
resolution by that time, I will replicate the test from home.

In the meantime, try replicating YOUR test with the URL above and see if it
works. We can at least try to eliminate as many variables as possible.

Anil

---------- Original Message ----------------------------------
From: "Sri" <Click here to reveal e-mail address>
Reply-To: "aspngmob" <Click here to reveal e-mail address>
Date: Thu, 28 Mar 2002 08:29:02 -0500

Thanks Anil, But thats not whats happening!
Here is an error message I received when I requstes a page after the
session has ended...
Any clue?
THanks
Sri
System.Web.HttpException: Exception of type System.Web.HttpException was
thrown. ---> System.IO.FileNotFoundException:
G:\Inetpub\TVGOLWireless\(54ibhfzitu3232cjck55yrlwlu45)\Menu.aspx

at System.Web.UI.TemplateParser.GetParserCacheItem()

at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context)

at System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)

at System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath,
String inputFile, HttpContext context)

at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String
requestType, String url, String path)

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)

--- End of inner exception stack trace ---

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)

at System.Web.MapHandlerExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

URL: http://www.xyz.com/(54ibhfzitu3232cjck55yrlwlu45)/Menu.aspx?__redir=1

----- Original Message -----
From: Anil John
To: aspngmob
Sent: Thursday, March 28, 2002 7:08 AM
Subject: [aspngmob] RE: problem in session management in mobile web
application

I would assume that if the user is visiting the site outside the session
timeout window, the server recognizes that the session has expired and
starts a new session for you. So book marking should not be a problem.

Anil

-----Original Message-----
From: Sri [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 8:53 PM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

So What will happen if a user bookmarks the url (that has session ID in
it)
and visits the site using that URL? Will he get an error??

-Sri

----- Original Message -----
From: "Simon Calvert" <Click here to reveal e-mail address>
To: "aspngmob" <Click here to reveal e-mail address>
Sent: Wednesday, March 27, 2002 5:33 PM
Subject: [aspngmob] RE: problem in session management in mobile web
application

For cookieless=true

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie

When cookieless=false, you may have the case where the device/emulator
itself cannot handle cookies, and so will error out.

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless="false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless="true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language="c#" Codebehind="myapp.aspx.cs"
Inherits="myapp.MobileWebForm1"
AutoEventWireup="false" %>
<%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<meta name="GENERATOR" content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="Mobile Web
Page">
<body xmlns:mobile="Mobile Web Form Controls">
<mobile:Form id="Form1" runat="server"
title="welcome">
<mobile:Label id="labname" runat="server">Enter
Name</mobile:Label>
<mobile:TextBox id="txtName"
runat="server"></mobile:TextBox>
<mobile:Command id="but1"
runat="server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id="Form2" title="welcome"
runat="server">
<mobile:Label id="labmsg"
runat="server">Label</mobile:Label>
<mobile:Label id="labemail" runat="server">Enter
Email</mobile:Label>
<mobile:TextBox id="txtEmail"
runat="server"></mobile:TextBox>
<mobile:Command id="btn2"
runat="server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id="Form3" runat="server">
<mobile:Label id="labfinal"
runat="server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text = "welcome " + txtName.Text;
ActiveForm = Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text = txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text = "Your emailid is " +
txtEmail.Text;
ActiveForm = Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

--
---------------------------------------------------------
- Anil John [Click here to reveal e-mail address]
- http://www.Kylas.com
- Connect with .net - Anytime. Anywhere.
---------------------------------------------------------
--

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
    
Simon Calvert
Where the URL contains the cookie to ID the session, then you see if
handling the OnViewStateExpire() event, and redirecting back to the
initial page using RedirectToMobilePage("mypage.aspx") works out.

If the ID is not used, then I think it will be reused to create a new
session. One thing to look out for might be, however, if a new session
ID is required, that the client might end up with 2 redirects, which may
case problems on some mobile devices.

An obvious thing using IE would be to set the privacy setting to block
all cookies when you test.=20

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Anil John [mailto:Click here to reveal e-mail address]=20
Sent: Thursday, March 28, 2002 8:11 AM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

Hmm...

Does this happen in both IE and the emulator/device that you are working
with?

I bookmarked an MMIT page with cookieless sessions turned on @:

http://www.kylas.com/(y3sozd45uopula2gfjoswfrl)/mdefault.aspx

Then killed my browser, waited 20+ minutes and used my bookmark without
any problems. BUT, I tested in IE 6.0 not in a wap emulator/device.

I am at work right now and can't test with an emulator (minor problems
with corporate firewall and authentication), but if someone has not
given you a resolution by that time, I will replicate the test from
home.

In the meantime, try replicating YOUR test with the URL above and see if
it works. We can at least try to eliminate as many variables as
possible.

Anil

---------- Original Message ----------------------------------
From: "Sri" <Click here to reveal e-mail address>
Reply-To: "aspngmob" <Click here to reveal e-mail address>
Date: Thu, 28 Mar 2002 08:29:02 -0500

Thanks Anil, But thats not whats happening!
Here is an error message I received when I requstes a page after the
session has ended...
Any clue?
THanks
Sri
System.Web.HttpException: Exception of type System.Web.HttpException was
thrown. ---> System.IO.FileNotFoundException:
G:\Inetpub\TVGOLWireless\(54ibhfzitu3232cjck55yrlwlu45)\Menu.aspx

at System.Web.UI.TemplateParser.GetParserCacheItem()

at
System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context)

at System.Web.UI.TemplateControlParser.GetCompiledInstance(String
virtualPath, String inputFile, HttpContext context)

at System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath,
String inputFile, HttpContext context)

at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context,
String requestType, String url, String path)

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)

--- End of inner exception stack trace ---

at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)

at System.Web.MapHandlerExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)

URL:
http://www.xyz.com/(54ibhfzitu3232cjck55yrlwlu45)/Menu.aspx?__redir=3D1

----- Original Message -----=20
From: Anil John=20
To: aspngmob=20
Sent: Thursday, March 28, 2002 7:08 AM
Subject: [aspngmob] RE: problem in session management in mobile web
application

I would assume that if the user is visiting the site outside the
session
timeout window, the server recognizes that the session has expired and
starts a new session for you. So book marking should not be a problem.

Anil

-----Original Message-----
From: Sri [mailto:Click here to reveal e-mail address]
Sent: Wednesday, March 27, 2002 8:53 PM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

So What will happen if a user bookmarks the url (that has session ID
in it)
and visits the site using that URL? Will he get an error??

-Sri

----- Original Message -----
From: "Simon Calvert" <Click here to reveal e-mail address>
To: "aspngmob" <Click here to reveal e-mail address>
Sent: Wednesday, March 27, 2002 5:33 PM
Subject: [aspngmob] RE: problem in session management in mobile web
application

For cookieless=3Dtrue

1. You might want to make sure that the emulators are cleared of any
cache that they may retain
2. Make sure that the url you request fist does not con tain an old
cookie

When cookieless=3Dfalse, you may have the case where the =
device/emulator
itself cannot handle cookies, and so will error out.

Simon Calvert
This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 22, 2002 7:32 AM
To: aspngmob
Subject: [aspngmob] problem in session management in mobile web
application

Hi

I am new to this .NET and Mobile Internet Toolkit
stuff.
I am facing following problem -

First senario :

with web.config file setting
<sessionState cookieless=3D"false" />

when I run the myapp.aspx page I get the following
error (after form2 execution) in
device emulators - Ericsson 380, Nokia 7110 and
Bluprint.

System.Exception

Session has expired or client did not send valid
cookie
Method: OnViewStateExpire

----------------------

Second senario :

with web.config file setting
<sessionState cookieless=3D"true"/>

It works perfectly in Ericsson 380,Blueprint
but shows message as follows in Nokia 7110

Page cannot be displayed

-----------------------

can you tell me , what may be the problem in case of
Nokia 7110 ( is it because of the sessionid appended
with the url? )
and how to solve this problem.
Also will you please explain me what is the
'OnViewStateExpire'
In one sample program I found onViewStateExpire method
overloaded
What exactly it does ? when one should override this
method ?

Thanx in anticipation,

Mayur Bapat

the code is ::::: myapp.aspx

<%@ Page language=3D"c#" Codebehind=3D"myapp.aspx.cs"
Inherits=3D"myapp.MobileWebForm1"
AutoEventWireup=3D"false" %>
<%@ Register TagPrefix=3D"mobile"
Namespace=3D"System.Web.UI.MobileControls"
Assembly=3D"System.Web.Mobile" %>
<meta name=3D"GENERATOR" content=3D"Microsoft Visual
Studio 7.0">
<meta name=3D"CODE_LANGUAGE" content=3D"C#">
<meta name=3D"vs_targetSchema" content=3D"Mobile Web
Page">
<body xmlns:mobile=3D"Mobile Web Form Controls">
<mobile:Form id=3D"Form1" runat=3D"server"
title=3D"welcome">
<mobile:Label id=3D"labname" runat=3D"server">Enter
Name</mobile:Label>
<mobile:TextBox id=3D"txtName"
runat=3D"server"></mobile:TextBox>
<mobile:Command id=3D"but1"
runat=3D"server">continue</mobile:Command>
</mobile:Form>
<mobile:Form id=3D"Form2" title=3D"welcome"
runat=3D"server">
<mobile:Label id=3D"labmsg"
runat=3D"server">Label</mobile:Label>
<mobile:Label id=3D"labemail" runat=3D"server">Enter
Email</mobile:Label>
<mobile:TextBox id=3D"txtEmail"
runat=3D"server"></mobile:TextBox>
<mobile:Command id=3D"btn2"
runat=3D"server">submit</mobile:Command>
</mobile:Form>
<mobile:Form id=3D"Form3" runat=3D"server">
<mobile:Label id=3D"labfinal"
runat=3D"server">Label</mobile:Label>
</mobile:Form>
</body>

and the code behind the page ::::: myapp.aspx.cs

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.Mobile;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace myapp
{
/// the standard code generated by VS
/// ------------
/// ------------

private void but1_Click(object sender,
System.EventArgs e)
{
labmsg.Text =3D "welcome " + txtName.Text;
ActiveForm =3D Form2;
}

private void btn2_Click(object sender,
System.EventArgs e)
{
labfinal.Text =3D txtName.Text + " your emailid is "
+ txtEmail.Text;
//labfinal.Text =3D "Your emailid is " +
txtEmail.Text;
ActiveForm =3D Form3;
}
}
}

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards(r)
http://movies.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

--
---------------------------------------------------------
- Anil John [Click here to reveal e-mail address]=20
- http://www.Kylas.com
- Connect with .net - Anytime. Anywhere.
---------------------------------------------------------
--

| [aspngmob] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp =3D JOIN/QUIT
| http://www.asplists.com/search =3D SEARCH Archives

Reply to this message...
 
    
Mayur Bapat
Anil,

I visited your link using Ericsson WapIDE3.1
emulator
and Nokia WaptoolKit and IE5.5
and found that it works fine in above cases.

When I tried by bookmarking one of my pages
after login page ...
I found that in Nokia 7110 it atomatically
redirected me to the first page (login page),
instead of showing me the bookmarked page ...

Also in case of Ericsson R380 , it took me to the
first page ...

PLEASE NOTE IN THESE PAGES, I HAVEN'T WRITTEN ANY
CODE FOR THE SESSION VALIDATION, so can anybody
explian this behavior ?

Thanks,
Mayur

--- Anil John <Click here to reveal e-mail address> wrote:
[Original message clipped]


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

Reply to this message...
 
    
Anil John
[Original message clipped]

This is what caught my attention.. So you actually HAVE a login to your
site? Forms based authentication? Is so, isn't what you are seeing expected
behaviour (redirect to a login page if enabled for directory)? You DO NOT
HAVE to write any code on individual pages to protect them (one of the great
advantages OF asp.net).

What am I not seeing, Mayur?

Anil

-----Original Message-----
From: Mayur Bapat [mailto:Click here to reveal e-mail address]
Sent: Friday, March 29, 2002 4:58 AM
To: aspngmob
Subject: [aspngmob] RE: problem in session management in mobile web
application

Anil,

I visited your link using Ericsson WapIDE3.1
emulator
and Nokia WaptoolKit and IE5.5
and found that it works fine in above cases.

When I tried by bookmarking one of my pages
after login page ...
I found that in Nokia 7110 it atomatically
redirected me to the first page (login page),
instead of showing me the bookmarked page ...

Also in case of Ericsson R380 , it took me to the
first page ...

PLEASE NOTE IN THESE PAGES, I HAVEN'T WRITTEN ANY
CODE FOR THE SESSION VALIDATION, so can anybody
explian this behavior ?

Thanks,
Mayur

--- Anil John <Click here to reveal e-mail address> wrote:
[Original message clipped]


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

| [aspngmob] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngmob.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 
System.EventArgs
System.Exception
System.IO.FileNotFoundException
System.Web.HttpApplication
System.Web.HttpContext
System.Web.HttpException
System.Web.UI.MobileControls.TextBox
System.Web.UI.PageParser
System.Web.UI.TemplateControlParser
System.Web.UI.TemplateParser
System.Web.UI.WebControls.TextBox
System.Windows.Forms.Menu
System.Windows.Forms.TextBox




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com