.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 2nd, 2003, 05:07 PM
sana sana is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 sana User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy i am having problems in managing sessions in asp.net using vb.net


hi....this is thee first time that i'm posting my problem here.
my problem is that i want to use sessions in asp.net using vb.net.... the scenario is that i want a user to sign in while viewing specific pages. these pages are user specific and they require the user to first sign in or logon at the site.
e.g if a user has posted a product fore online bidding, and now he wants to edit his posted offer, then the pages that show his post must require his sign in before he can do any editing. same if the session expires then the user must be redirected to the sign in page.
i worked on it a lot......and the problem that i encountered was that a session is started when user views a page and it ends or it is restarted when i redirect the user to another page. even the session id is changed for evry other page...and if i refresh the page session id also changes.
i made the logic that i declared session("id")="start" in global.asax file. and then in the sign in page i changed this value to be session("id")=request.form("User_Id").
now according to my logic, it should remain the same until the sessions ends. so that with every new page, the page should check this session("id") variable, if it is empty then the user must b redirected to the sign in page but if it contains the user id that he entered in the User_Id text box then the page should display the information specific to that user.
but it doesnt work....if any body knows the solution to this problem then please reply me or mail me....i'm waiting....

Reply With Quote
  #2  
Old October 3rd, 2003, 03:34 AM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 17
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
Is your sessionstate enabled in your web.config file?
__________________
- Rogier Doekes

Reply With Quote
  #3  
Old October 4th, 2003, 12:56 PM
numbernine numbernine is offline
Up To His Eyes In Ads
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Chicago
Posts: 160 numbernine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 25 sec
Reputation Power: 17
Also are all the pages in the same project?

Reply With Quote
  #4  
Old October 5th, 2003, 04:47 PM
sana sana is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 sana User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by numbernine
Also are all the pages in the same project?


yes, all the pages are included in a single project.
every time the user closes a page or refresh a page, a new session is started and the session id is changed. if the session id could remain same when the user visits different pages in the same application, then it can solve my problem. but session id doesnt remains same. i have read in books n everywhere that a session ends when user leaves the application, but when i tried it, i experienced that a session ends when a user closes a page or refreshes it. if u know the problem to my solution then plz reply me as soon as possible. thnx

Reply With Quote
  #5  
Old January 26th, 2004, 06:29 PM
skms skms is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 skms User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try adding the following entry
<sessionState mode="InProc" cookieless="false" timeout="20" />
in web.config file....

Maybe ur cookieless is set to true which means a new session id will be created for each (relative) page u open to keep its internal tracking....

Hope it works..
All the best

Reply With Quote
  #6  
Old May 19th, 2004, 02:02 PM
Cartmania Cartmania is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 Cartmania User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Instead of session("id")="start" try using Session.Add("id", "start")

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > i am having problems in managing sessions in asp.net using vb.net


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap