473,378 Members | 1,475 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Session behaving like FIFO queue in asp.net

Hi All

I'm trying to add a dictionary object and a stack (C#) to the Session
state as follows:

//Create Dictonary object and add 1 kvp
Dictionary<String, StringdicDonation = new Dictionary<String,
String>();
dicDonation.Add("strVar1", "strValue1");

//Create Stack object and add 1 kvp
Stack<StringPQStack = new Stack<String>();
PQStack.Push("donations");

//Commit objects to Session state
Session["Donations"] = dicDonation;
Session["PQStack"] = PQStack;
Session["test1"] = "Test1";
Session["test2"] = "Test2";

I added some simple test strings at the bottom as well. When I step
through this in debug mode, I can see the Donations dictionary added to
Session. But, when PQStack is added Donations is immediately removed.
The next test strings work the same way; test1 pushes PQStack out, then
test2 pushes test1 out. Bottom line is I'm only ever left with the
last kvp I put in Session. Any ideas?

Thanks
Mark

Dec 13 '06 #1
1 1241
Actually I found that this has nothing to do with stack and dictionary
objects. If I try to commit simple strings, it behaves the same:

Session["test1"] = "test1"
Session["test2"] = "test2"
Session["test3"] = "test3"

At the end, I'm left only with [test3] in Session. Wonder if it has
anything to do with state mngt on the ASP developer web server built
into VS?

Thanks
Mark

Dec 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Luca | last post by:
I have the need of a container of integers showing both the characteristics of an associative container (all integer elements different from each other) and the FIFO behaviour. Do you know if...
2
by: worli | last post by:
Hi All, I have a strange requirement. I have a dynamic input numeric data stream e.g. 2, 2, 4, 5 etc.... ( each input number range from 1 to 10 ). lets take a simple case where all inputs will...
2
by: Michele Moccia | last post by:
How can I implement a "time critical" fifo in c++ ? I just have to manage sequences of raw bytes, no user defined types. An std::queue<unsigned char> or std::deque<unsigned char> seems to be slow....
8
by: Jack | last post by:
I want to implement a fixed-size FIFO queue for characters. I only want to use array not linked list. For example, const int N = 10; char c_array; The question is when the queue is full,...
5
by: Dinsdale | last post by:
I have an application that recieves text data via external input (i.e. serial) and displays it on the screen (we use carraige return as a delimiter). At this point I use a regular old text box and...
4
by: David Bear | last post by:
I'm looking to see if there are any examples or prewritting fifo queue classes. I know this is a broad topic. I'm looking to implement a simple application where a web server enqueue and pickle...
0
by: kmoeWW | last post by:
Hi all, I'm using the PICC CCS C compiler and am having issues with starting an enque/deque for my program. What I need it to do is to hold about 9 data packets, each packet is an array of 4 HEX...
2
by: Spoon | last post by:
Hello, I'm wondering whether the STL defines a data structure with the following features: o provides push_front() and pop_back() (like std::list) to implement a FIFO buffer. o allows fast...
5
by: akenato | last post by:
Hi for me this is th first time that I use c++. I have to do this exercise. Somebody can help me? Thanx. Implement a FIFO-queue ( first in, first out ) as a ring buffer. Use a static array as the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.