Blog from Saravanan Arumugam

Let us talk about Technologies

The given key was not present in the dictionary


I was getting the following exception in the WCF proxy initialization statement. This happened in my Silverlight client application.

Exception:

The given key was not present in the dictionary

Later I realized that I created app.config file using SvcUtil.exe.

Silverlight uses ServiceReference.ClientConfig in places of app.cofig/web.config.

 

Solution:

When I copied the app.config content into ServiceReference.ClientConfig, I got rid of the issue.

 

Note: Looks like the error “The given key was not present in the dictionary” will be thrown to say that no endpoint is specified.

Reference: Getting tired of "The given key was not present in the dictionary"

Advertisements

One response to “The given key was not present in the dictionary

  1. Proactiv April 21, 2011 at 5:34 am

    I really liked the post. I am running Arch Linux with the Chrome nightly builds and your site’s images is sorta broken for me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: