Note that there are some explanatory texts on larger screens.

plurals
  1. POSilverlight 4 Error using WCF services to return Generic List items c#
    text
    copied!<p>I am getting the below error when trying to access a WCF Silverlight enabled service hosted in a standard way in a web app. I am trying to return a List of type <code>&lt;ER_Theme&gt;</code> to the Silverlight app.</p> <p>This is the Services.References.ClientConfig generated in the Silveright app:</p> <pre><code>&lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;customBinding&gt; &lt;binding name="CustomBinding_ER"&gt; &lt;binaryMessageEncoding /&gt; &lt;httpTransport maxReceivedMessageSize="1000000000" maxBufferSize="1000000000" /&gt; &lt;/binding&gt; &lt;/customBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://localhost:52377/ER.svc" binding="customBinding" bindingConfiguration="CustomBinding_ER" contract="ERService.ER" name="CustomBinding_ER" /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre> <p>The actual Service code is as follows:</p> <pre><code> [OperationContract] public List&lt;ER_Theme&gt; GetThemes() { // Add your operation implementation here using (Client_BespokeEntities myDB = new Client_BespokeEntities()) { List&lt;ER_Theme&gt; myThemes; myThemes = (from p in myDB.ER_Themes select p).ToList(); return myThemes; } } </code></pre> <p>This is the WebConfig settings in the Web App:</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;customBinding&gt; &lt;binding name="SilverlightTool.Web.ER.customBinding0"&gt; &lt;binaryMessageEncoding /&gt; &lt;httpTransport /&gt; &lt;/binding&gt; &lt;/customBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="SilverlightTool.Web.SilverlightServiceAspNetAjaxBehavior"&gt; &lt;enableWebScript /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=""&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt; &lt;services&gt; &lt;service name="SilverlightTool.Web.ER"&gt; &lt;endpoint address="" binding="customBinding" bindingConfiguration="TMPSilverlightTool.Web.ER.customBinding0" contract="SilverlightTool.Web.ER" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; </code></pre> <p>The error I'm getting is as follows:</p> <pre><code>{System.Net.WebException: The remote server returned an error: NotFound. ---&gt; System.Net.WebException: The remote server returned an error: NotFound. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) at System.Net.Browser.BrowserHttpWebRequest.&lt;&gt;c__DisplayClass5.&lt;EndGetResponse&gt;b__4(Object sendState) at System.Net.Browser.AsyncHelper.&lt;&gt;c__DisplayClass2.&lt;BeginOnUI&gt;b__0(Object sendState) --- End of inner exception stack trace --- at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)} </code></pre> <p>Can anyone help me out with this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload