Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 2nd, 2012, 04:54 AM
Authorized User
Points: 308, Level: 6
Points: 308, Level: 6 Points: 308, Level: 6 Points: 308, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Dec 2006
Location: Kolkata, West Bengal, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Facing problem with session variable in web service.

Hi all,
I have written a web service. Websites will consume this service from several pages of that site. Along with other tasks, my service has to track whether the user has entered in the website and visiting all those pages in one go. To trak that I have enabled the session for that web method and I have used a session variable for this.
if (Session["SERVICE_S_ID"] == null)  
Session["SERVICE_S_ID"] = HttpContext.Current.Session.SessionID;  
sessionid = Session["SERVICE_S_ID"].ToString();
Now I saved this sessionid value in the database to track whether the user is browsing different pages of the site in one go.
To test this, I have created a website with some pages and consume this service from all this page (in page_load). Now when I am browsing this site using IE, it is working fine and saving the same session id for borwsing all this pages. But surprisingly when I am browsing this pages using Firefox or Crome, it is saving different sessionid (though I am browsing the pages in one go). Which means for every page the Session["SERVICE_S_ID"] variable becomign null. I cannot understand why it is happening.
Can any one please help me on this.
Thanks in advance.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with session variable prabhatsriva01 ASP.NET 2.0 Professional 3 May 10th, 2007 11:41 AM
Session Variable Problem caterpillar General .NET 0 August 17th, 2006 11:26 AM
Session Variable Problem kwilliams ASP.NET 2.0 Basics 0 June 12th, 2006 11:56 AM
Another Session Variable Problem jim.sullivan@telus.net Classic ASP Databases 1 August 1st, 2004 03:58 AM
Session Variable Problem leo_vinay Classic ASP Professional 1 October 1st, 2003 10:51 PM

All times are GMT -4. The time now is 10:35 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.