Error "Method Not Allowed" while testing WCF RESTFUL service using WCF Test Client RRS feed

  • Question

  • Hi,
    I am getting below error:
    "Method Not Allowed.HTTP GET Error    URI: http://localhost:59570/BankInstitutionService.svc    There was an error downloading 'http://localhost:59570/BankInstitutionService.svc'"

    My service endpoint details:

          <service behaviorConfiguration="InvestmentManagerWCF.BankInstitutionServiceBehavior"
            <endpoint address="" binding="webHttpBinding" contract="InvestmentManagerWCF.IBankInstitutionService">
                <dns value="localhost" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
            <behavior name="InvestmentManagerWCF.BankInstitutionServiceBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="false" />

    Please let me know if you have thoughts.


    Sunday, April 28, 2013 1:06 PM


All replies

  • Hi..

    Possible reason.. you might be having only POST methods in Service Contracts. Verify.



    Sunday, April 28, 2013 1:21 PM
  • No. I am having below methods:

    [WebInvoke(Method="Get",UriTemplate = "bank/{bankId}")]    
    BankInstitution GetBankInstituion(int bankId);        
    [WebInvoke(Method = "Post",UriTemplate = "banks}")]        
    bool SaveBankInstituion(BankInstitution BankInstitution);

    Sunday, April 28, 2013 1:28 PM
  • Hi,

    Some features are not supported by WCF Test Client, for WebHttpbinding, Json response message support but not for Xml. Please check if this is the issue.

    The following is a list of features not supported by WCF Test Client:

    • Types: Stream, Message, XmlElement, XmlAttribute, XmlNode, types that implement the IXmlSerializable interface, including the related XmlSchemaProviderAttribute attribute, and the XDocument and XElement types and the ADO.NET DataTable type.
    • Duplex contract.
    • Transaction.
    • Security: CardSpace , Certificate, and Username/Password.
    • Bindings: WSFederationbinding, any Context bindings and Https binding, WebHttpbinding (Json response message support).

    Best Regards.

    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 29, 2013 9:28 AM
  • Following below step by step approach worked:


    • Marked as answer by AbhilashShah Wednesday, May 1, 2013 3:10 AM
    Wednesday, May 1, 2013 3:10 AM