Share via


Facing error the given key was not present in the dictionary

Question

Wednesday, July 18, 2012 5:18 PM

Hi

I am creating a silverlight business applicaton with RIA support. When i try to create ADO.Net entity Data Model object  using Sql server , i am getting this error message 'the given key was not present in the dictionary' after I select the database click OK button.

I am getting the same error when I use MySql or Sql Server 2008 Express as data source.

I am using Visual Studio 2010.

can anyone help me on this.

 

All replies (1)

Friday, July 20, 2012 8:24 AM âś…Answered | 1 vote

Hi santubangalore,

Seems you can solve your issue by referring to this page 

http://social.msdn.microsoft.com/Forums/en/vssetup/thread/c59cdca4-bad6-481c-85af-69c149b6f1aa

Maybe change a use account or deleted the folder below can help.

C:\Documents and Settings\USERNAME\Application Data\Microsoft\VisualStudio\10.0

What's more, I found this thread http://forums.silverlight.net/t/117712.aspx/1 

"

This error is not related to StaticResource binding, it's usually caused by incorrect webservice configuration.

when using nonparameter constructor to create ServiceClient, it will look up ServiceReferences.ClientConfig for endpoint configuration, if no configuration is available, "the given key is not present..." error will be thrown with no specificed key name.

So, when you got this error message, please check ServiceReferences.ClientConfig file. And there is a bug: when adding new service reference, ServiceReferences.ClientConfig file doesn't generate simultaneously. An workaround is reload the solution.

"

Sounds related to this issue.

Garros