views:

463

answers:

2

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?

+1  A: 

Get needs to enabled. Check that first.

CodeToGlory
What do you mean? How would I do this?
marcgg
http://support.microsoft.com/kb/819267 this is pertaining to .net 1.1.
CodeToGlory
+6  A: 

Change your web.config like so:

<system.web>
    ...
    <webServices>
        <protocols>
              <add name="HttpSoap"/> 
              <add name="HttpPost"/>
              <add name="HttpGet"/>
        </protocols>
    </webServices>
</system.web>
Flory
thanks, but then how do I call the web service?
marcgg
oh, found it, it now displays in the template page. thanks!
marcgg
Use GET. Isn't that what you're question is about?
John Saunders
it wasn't obvious that I will be able to go /app/AutocompleteManager.asmx/AutocompleteComposers? ... (which for the record is now the URL I have to call)
marcgg