This is a terribly annoying and uninformative error which occurs sometimes while developing Silverlight applications. At its core, the error seems to happen any time the Silverlight client is unable to retrieve content and/or not understand the content which it has retrieved. I guess one could argue that it is a network-related error (not being able to get data off the wire, or getting data which may be corrupted); but the error code to me just seems highly generic and, well, in great need of rework.
…when searching the internet, you’ll come across many different problems causing this error. In my particular scenario, however, the problem was the result of missing security policy files which SL requires in order to initiate network activity (even in the event the destination host is LOCALHOST).
In order to resolve the issue, I simply created a clientaccesspolicy.xml file at the root of the website (wwwroot, in my instance) with the following content:
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
I stumbled across the fact the security file was missing by way of Fiddler2; and then found out what generic content to add to the policy file here.