6

I have a webservice defined here:

/app/AutocompleteManager.asmx

[WebMethod]
public string AutocompleteComposers()
{
  return "hey, what's up";
}

I want to call it using the GET method with extra parameters.

If I just go /app/AutocompleteManager.asmx?q=something, it won't work because I don't have the action specified.

If I go /app/AutocompleteManager.asmx/AutocompleteComposers?q=something it breaks.

Any idea?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
marcgg
  • 65,020
  • 52
  • 178
  • 231

2 Answers2

18

Change your web.config like so:

<system.web>
    ...
    <webServices>
        <protocols>
              <add name="HttpSoap"/> 
              <add name="HttpPost"/>
              <add name="HttpGet"/>
        </protocols>
    </webServices>
</system.web>
marcgg
  • 65,020
  • 52
  • 178
  • 231
Flory
  • 2,849
  • 20
  • 31
-1

Get needs to enabled. Check that first.

Srikar Doddi
  • 15,499
  • 15
  • 65
  • 106