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

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

LVL 2
ZuZuPetalsAsked:
Who is Participating?
 
ZuZuPetalsAuthor Commented:
I'm not using Server.Transfer, so the expert's comment doesn't really apply.

No satisfactory answers.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.