Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

List webservice in silverlight webpart - KeyNotFoundException

$
0
0

Hello,

I have a problem by using the Lists.asmx webservice in my Silverlight 4 Webpart.

I have created the service reference to the webservice. When I try to create the ListsSoapClient instance I get a KeyNotFoundException...

Here is my code:

ListsSoapClient proxy = new ListsSoapClient(); //<-- Exception
proxy.GetListItemsCompleted += new EventHandler<GetListItemsCompletedEventArgs>(DisplayInfoGetEvents);

XElement query = new XElement("Query");
XElement queryOptions = new XElement("QueryOptions");
XElement viewFields = new XElement("ViewFields");
proxy.GetListItemsAsync("Urlaubskalender",
null,
query,
viewFields,
null,
queryOptions,
null);

I have used the blogpost from Kirk Evan (http://blogs.msdn.com/b/kaevans/archive/2009/04/28/sharepoint-for-developers-part-4-consuming-sharepoint-web-services-from-silverlight.aspx ) as tutorial but it don't works... I have searched some hours but I couldn't found usefull links about the exception in this context.

I have no ideo why it throws the KeyNotFoundException but i hope someone can help me.

Thanks for all helpfull answers :)


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>