Find solution

How to call the WCF service from silverlight application?

Check our answers to ‘How to call the WCF service from silverlight application?’ - we found 13 replies and comments relevant to this matter. The best answers are submitted by users of Stack Overflow, Quora and Yahoo! Answers.

Best solution

  • Error when making call to WCF from Silverlight application using HttpWebRequest

    I am trying to make a call from a Silverlight application to a WCF service returning JSON. It's simply returning an integer. I have used Fiddler to verify that it is never making the call to my webservice. I am getting an error that says "Operation is not valid due to the current state of the object." It occurs on the line, HttpWebResponse response = (HttpWebResponse) _webRequest.EndGetResponse(result); Stacktrace can be provided if needed. public MainPage() { InitializeComponent(); ...

    Answer:

    "GET" requests cannot have a Content-Type header (they cannot have content). The HttpWebRequest...

    Mark as irrelevant Undo

Other solutions