Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Service and Silverlight
    text
    copied!<p>I'm new to WCF technology. I have the following situation: one instance of VS contains the WCF class library and client host, the second instance of a Silverlight application. I run a client host and then run Silverlight application, and I get the error: "Could not find endpoint element with name 'WSHttpBinding_IEvalService' and contract 'EmailWCFServiceReference.IEvalService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element."</p> <p>My code:</p> <pre><code>&lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="MetaData"&gt; &lt;serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8080/evals/meta" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service behaviorConfiguration="MetaData" name="EvalServiceLibrary.EvalService"&gt; &lt;endpoint address="http://127.0.0.1:8080/evals/basic" binding="basicHttpBinding" contract="EvalServiceLibrary.IEvalService" /&gt; &lt;endpoint address="http://127.0.0.1:8080/evals/ws" binding="wsHttpBinding" contract="EvalServiceLibrary.IEvalService" /&gt; &lt;endpoint address="net.tcp://127.0.0.1:8081/evals" binding="netTcpBinding" contract="EvalServiceLibrary.IEvalService"/&gt; &lt;endpoint address="http://localhost:8080/evals/mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;endpoint address="net.tcp://localhost:8081/evals/mex" binding="mexTcpBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; </code></pre> <p>In Silverlight:</p> <pre><code>EvalServiceClient channel = new EvalServiceClient("WSHttpBinding_IEvalService"); Eval eval = new Eval(); channel.GetEvalsCompleted += (t, r) =&gt; { if (!r.Cancelled &amp;&amp; r.Error == null) grOdebrane.ItemsSource = r.Result; else MessageBox.Show("Nie ma danych"); }; channel.GetEvalsAsync(); </code></pre> <p>Ok I change WSHttpBinding_IEvalService to BasicBinding_IEvalService and i have another error: "An error occurred while trying to make a request to URI 'http://127.0.0.1:8080/evals/basic'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details."</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