2

I am using the following code in my interface and using webapi service.

[OperationContract] [WebInvoke(Method = "GET")] bool IsPaymentGatewayExitsForTenant(string tenantSlugName, string productCode); 

I am running locally and testing the service using rest client

api/PaymentGatewayService/IsPaymentGatewayExitsForTenant?tenantSlugName=KPN&productCode=POSS 

But I am getting the following errror enter code here

{"Message":"The requested resource does not support http method 'GET'."} `enter code here` 

Any help would be appeciated.

2
  • 1
    What is the base class of your Controller? Please show some more code. Commented Oct 30, 2013 at 6:02
  • @markus ApiController Commented Oct 30, 2013 at 6:11

1 Answer 1

5

Could you please decorate yout controller class method "IsPaymentGatewayExitsForTenant" with "HttpGet" attribute

[System.Web.Http.HttpGet] bool IsPaymentGatewayExitsForTenant(string tenantSlugName, string productCode) { // your code goes here } 

hopes this works

Sign up to request clarification or add additional context in comments.

1 Comment

@madhu On StackOverflow, if someone suggests an answer and the answer fixes the problem you were having, please click the grey check mark to the left of the proposed answer. For more information, please look here meta.stackexchange.com/questions/5234/….

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.