title: Error using WCF service
body: <p>This are my first steps in programming ap WCF service using a tutorial from the MSDN sites.</p>
  
  <p>What i've done:</p>
  
  <ol>
  <li>creating a service project (ASP.NET Web Application in VS 2013)</li>
  <li>creating an Entity Data Model (EF 6) from existing MS sample database (AdventureWorksLT) including a database table</li>
  <li>creating the service ("Add New Item", Template "WCF Data Service" Name "AdventureWorksService")</li>
  <li>configuring the service by copy and paste the source code for the service from the MSDN site</li>
  <li>creating the WPF Client Application by adding a new WPF application template to the solution</li>
  <li>add a new data source from type "Service"</li>
  <li>in the dialog box "Add Service Reference" i clicked on "Discover"
  The created service "AdventureWorksService" appears in the list of available services with the address "<a href="http://localhost:53948/AdventureWorksService.svc" rel="nofollow">http://localhost:53948/AdventureWorksService.svc</a>". </li>
  </ol>
  
  <p>Now i have to click the button "OK" to download the service information. At this point, i receive an error (beware, that I', using a German Visual Studio, so the translation may not match the original message in English Version:</p>
  
  <p>"Error: Cannot obtain Metadata from the address. Make sure, the address is correct"</p>
  
  <p>If i click the linklabel "Details", i get the following informations:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>**Error: Cannot obtain Metadata from "http://localhost:53948/AdventureWorksService.svc/_vti_bin/ListData.svc/$metadata".**
  
  --
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    ...
  &lt;/html&gt;
  --.
  Metadata contains a reference that cannot be resolved: "http://localhost:53948/AdventureWorksService.svc".
  The contenttype "text/html" of the message doesn't match with the content type of the binding (application/soap+xml; charset=utf-8). </code></pre>
  </div>
  </div>
  </p>
  
  <p>There's no App.config in the service project, but a Web.Config:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    Weitere Informationen zum Konfigurieren der ASP.NET-Anwendung finden Sie unter
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" strict="false" explicit="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
    &lt;/system.web&gt;
    &lt;connectionStrings&gt;
      &lt;add name="AdventureWorksLTEntities" connectionString="metadata=res://*/AdventureWorksModel.csdl|res://*/AdventureWorksModel.ssdl|res://*/AdventureWorksModel.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=MB-SQL2008;initial catalog=AdventureWorksLT;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
        &lt;parameters&gt;
          &lt;parameter value="mssqllocaldb" /&gt;
        &lt;/parameters&gt;
      &lt;/defaultConnectionFactory&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
    &lt;system.serviceModel&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I guess it has to do with the HTTP-protocol, which is not defined in the service.</p>
  
  <p>Can you help me what to do? I hope, i've posted all the neccessary information.</p>
  
  <p>Thanks
  Michael</p>