I have developed application which runs on Framework 4.0. Its works fine on my local machine and IIS 7.0 but it fail to work on IIS 6.0. I am getting below error
{"Message":"An attempt was made to call the method \u0027SendMailMessage\u0027 using a GET request, which is not allowed.","StackTrace":" at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
I have set below property on my code behind code.
[WebMethod]
[ScriptMethod(UseHttpGet = false)]
my Jquery method
setTimeout(function() {
$.ajax({
cache: false,
type: "POST",
url: "Test.aspx/TestMethod",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
data: JSON.stringify({
"strSubmitDate": $("#txtDate").val()
}),
success: function (data) {
alert(data.d);
$("#floatingBarsG").hide();
},
error: function (xhr, ajaxOptions, thrownError) {
//debugger;
alert(xhr.responseText);
}
});
}, 2000);
any help appreciated...thanks in advance