1

Jquery call:

$.post({
        url: "http://localhost:60700/Main//Data/dataServices.aspx",
        data: { action: "savePhoneData", phoneID: PhoneID, values : JSON.stringify(allData) },
        success: phoneSaved,
        error: phoneSavedFailed
    });

I have similar functions in the project that use the GET method and work just fine. In this case, however, POST must be used due to the amount of data.

The error I get is: The HTTP verb POST used to access path '/Main/[object Object]' is not allowed.

Please help !

David
  • 1,051
  • 5
  • 14
  • 28

2 Answers2

0

I'm not a .NET expert but it seems like that specific servlet does not support post.

u.k
  • 3,091
  • 1
  • 20
  • 23
0

I used an ASMX page instead:

public class Handsets : System.Web.Services.WebService
    {

        [WebMethod]
        public string Test(object items)
        {
            List<object> lstItems = new JavaScriptSerializer().ConvertToType<List<object>>(items);
            return "wow";
        }
    }
David
  • 1,051
  • 5
  • 14
  • 28