title: How to access WCF service methods from browser?
body: <p>It's a code that was created in Visual Studio 2013 by default wizard.
  In project properties I set to use Local IIS.
  WCF Test Client test it successfully.
  But if I access page </p>
  
  <pre><code>http://localhost/WcfService1/Service1.svc/GetTime
  </code></pre>
  
  <p>in browser then I see empty browser screen and Fiddler show "HTTP/1.1 400 Bad Request".
  I understand that I need to modify web.config, and attributes for the method in interface but don't know how. Could you help me? Thank you.</p>
  
  <p>IService1.cs</p>
  
  <pre><code>using System.Runtime.Serialization;
  using System.ServiceModel;
  namespace WcfService1
  {
      [ServiceContract]
      public interface IService1
      {
          [OperationContract]
          string GetTime();
      }
  }
  </code></pre>
  
  <p>Service1.svc.cs</p>
  
  <pre><code>using System;
  namespace WcfService1
  {
      public class Service1 : IService1
      {
          public string GetTime()
          {
              return DateTime.Now.ToShortTimeString();
          }
      }
  }
  </code></pre>
  
  <p>web.config</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
    &lt;appSettings&gt;
      &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;protocolMapping&gt;
          &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
      &lt;/protocolMapping&gt;    
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
      &lt;directoryBrowse enabled="true"/&gt;
    &lt;/system.webServer&gt;
  
  &lt;/configuration&gt;
  </code></pre>