Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So you have a *.svc file to host your service. Can you right-click in Visual Studio on that file and say "Show in Browser" ? Do you get anything there, or does it throw an error right away??</p> <p>Next: your service endpoint has no <code>address=""</code> attribute, which I believe is mandatory - try adding that (even if you don't specify an address in it).</p> <p>If you're hosting in IIS, your service address is defined by the virtual directory where your SVC file is present, and the SVC file itself - you might not be able to define a specific port or anything (IIS will handle that).</p> <p>So try to connect to </p> <pre><code>http://localhost/Services/Service1.svc </code></pre> <p>Does that work by any chance??</p> <p>Update: reading your post again more closely, you're specifying a special factory for the service - <code>WebServiceHostFactory</code>. Is this the default <code>WebServiceHostFactory</code> provided by .NET, or is that something you built yourself??</p> <p>The point is: the .NET <code>WebServiceHostFactory</code> will use the <code>webHttpBinding</code> for RESTful WCF services - that won't work with an endpoint specifying <code>basicHttpBinding</code>, nor will the REST service have any metadata....</p> <p><strong>Update #2:</strong> try to use just the service's fully qualified class name, but without the assembly specification, in both your SVC file, and the config file.</p> <p>So change this:</p> <pre><code>Service="MyApp.Core.Service.Service.MyAppService,MyApp.Core.Service" </code></pre> <p>to this:</p> <pre><code>Service="MyApp.Core.Service.Service.MyAppService" </code></pre> <p><strong>SVC file:</strong></p> <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="MyApp.Core.Service.Service.MyAppService" %&gt; </code></pre> <p><strong>Config file:</strong></p> <pre><code>&lt;services&gt; &lt;service name="MyApp.Core.Service.Service.MyAppService" behaviorConfiguration="MainServiceBehavior"&gt; &lt;endpoint name="newEndpoing" binding="basicHttpBinding" bindingConfiguration="" contract="MyApp.Core.Service.IMyAppService" /&gt; &lt;/service&gt; &lt;/services&gt; </code></pre>
 

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