tags:

views:

207

answers:

1

I am having ajax enabled wcf service which i can only call with get not post, although i can work with get but is there any reason for that? Is it required to have webmethod enabled or something?

here is how my wcf service looks

    [OperationContract]
    [WebGet]
    public System.Collections.Generic.IEnumerable<ListingDisplay> Find(string postalCode)

I added [WebGet] when tried using jquery ajax, it wasn't required with asp.net scriptmanager.

+1  A: 

Check out the [WebInvoke()] attribute - it should allow you to specify the POST, PUT, DELETE HTTP verbs, too, on your method.

Marc

marc_s