Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call an ASMX web service via GET?

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?

like image 913
marcgg Avatar asked Jul 30 '09 18:07

marcgg


People also ask

How do I call Asmx service from .NET core?

Right click on Connected Services folder (should appear just below your project) and select Add Connected Service. Then select "Add a WCF web service". Put your asmx url into the URI field, set the name space and click Finish. You will now have the reference set.


1 Answers

Change your web.config like so:

<system.web>
    ...
    <webServices>
        <protocols>
              <add name="HttpSoap"/> 
              <add name="HttpPost"/>
              <add name="HttpGet"/>
        </protocols>
    </webServices>
</system.web>
like image 168
Flory Avatar answered Oct 19 '22 09:10

Flory