Hi..
1st Query......
I have a session variable cityId through which i find all the record. When i leave my application unattended for sometime then session expires & it does get the value for city & then throws exception. How I can redirect to a error page when session expires like this.
2nd Query
When I click some page(myprofile.aspx), then i checks if the user is loged in or not, if user is not loged in then redirect to the login page & if loged in then show the page
If I give the user login if user not logined to view the myprofile.aspx then when the use logs in the it should directly go the myprofile.aspx page rather than whatever i provided after login.
Help Me Out.
Loading

Manikavelu VelayuthamRank #413 · 6K reputationPosted Nov 26, 2010, 1:41 AM EST
You can handle the session end event there.
Session_Start Event
Session_End Event
Like that its available for Application also.
You can write your own logic there.
CrishRank #1,487 · 1.1K reputationPosted Nov 29, 2010, 2:13 AM EST
Manikavelu VelayuthamRank #413 · 6K reputationPosted Nov 29, 2010, 2:17 AM EST
How can it be a bug in asp.net ?
CrishRank #1,487 · 1.1K reputationPosted Nov 29, 2010, 3:07 AM EST
you can set session time in global.asax or in web.config file or in IIS but session will out after some time. No matter how...best way you can use cookies for your session problem.
Suthish NairRank #92 · 22.8K reputationPosted Nov 29, 2010, 5:36 AM EST
The problem re-solved?