title: Method Not Found in WCF service?
body: <p>I am newbie in creating WCF web service. I am using VS2012 with target framework 4.5. I have added a WCF Service file in my project. 
  In "IService.cs" I have written the following code</p>
  
  <pre><code>   namespace _3TWebServ
      {
          // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
          [ServiceContract]
          public interface IService1
          {
              [OperationContract]
              [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped,
                            RequestFormat = WebMessageFormat.Json,
                            UriTemplate = "Calculate")]
              String Calculate(Inputs ip1);
          }
  
  
          [DataContract]
          public class Inputs
          {
              [DataMember(Name = "Coil_type")]
              public string Coil_type { get; set;}
  
              [DataMember(Name = "Finned_length")]
              public string Finned_length { get; set;}
          }
  
      }
  </code></pre>
  
  <p>and in "Service.svc.cs"</p>
  
  <pre><code>namespace _3TWebServ
  {
      public class Service1 : IService1
      {
          [DataMember]
          public string input;
  
          public String Calculate(Inputs ip1)
          {
              String str = ip1.Coil_type + ip1.Finned_length;
              return str;
          }
      }
  }
  </code></pre>
  
  <p><strong>But the problem comes when I run my service its not showing my method Calulate, When I pass  my URL as Following 
  localhost:2121/Service1.svc/Calculate it shows "method not allowed" error.</strong></p>
  
  <p>I have done some Googling and enabled my IIS manager Directory Browsing. My config file is following</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
    &lt;/system.web&gt;
  
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="_3TWebServ.IService1"  name="_3TWebServ.Service1"&gt;
          &lt;endpoint  address="" behaviorConfiguration="Rest" binding="webHttpBinding" contract="_3TWebServ.IService1"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost" /&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;!--endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;--&gt;
        &lt;/service&gt;
      &lt;/services&gt;
  
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="_3TWebServ.IService1"&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
  
        &lt;endpointBehaviors&gt;
          &lt;behavior name="Rest"&gt;
            &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
  
      &lt;/behaviors&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>