Solved

ASP.Net: Session Object: Item has already been added. Key in dictionary: 'MyKey' Key being added: 'MyKey'

Posted on 2009-04-08
2
917 Views
Last Modified: 2012-06-27
This is bizarre.

I've been doing ASP for over 10 years and I've never seen this before.   The below line of code is failing.  Why?  I've re-assigned values to collection keys dozens of times.  Why would this start complaining now?

The error message:

 Item has already been added. Key in dictionary: 'MyKey' Key being added: 'MyKey'
Session["MyKey"] = "some string"

Open in new window

0
Comment
Question by:ZuZuPetals
2 Comments
 
LVL 16

Assisted Solution

by:sunithnair
sunithnair earned 300 total points
ID: 24098828
0
 
LVL 2

Accepted Solution

by:
ZuZuPetals earned 0 total points
ID: 24148411
I'm not using Server.Transfer, so the expert's comment doesn't really apply.

No satisfactory answers.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now