The HTTP verb POST used to access path '/folder/page.asmx/GetMethod' is not allowed.

Error Message: The HTTP verb POST used to access path '/folder/page.asmx/GetMethod' is not allowed. Url: http://sitename.com.au/folder/page.asmx/GetMethod Stack Trace: at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Cause: This happens when you have a Url rewrite running on your site. You need to tweek the code to the Url rewrite to ignore the Web service (.asmx) files in global.asax file. See code below:

Solution: Below are the changes you need to do in global.asax
protected void Application_BeginRequest(object sender, EventArgs e)
{

    // For Web service to work for Jquery Ajax
    if (Request.Path.IndexOf(".asmx") != -1)
    {
        IgnoreWebServiceCall(HttpContext.Current);
        return;
    }

}

private void IgnoreWebServiceCall(HttpContext context)
{
    int dotasmx = context.Request.Path.IndexOf(".asmx");
    string path = context.Request.Path.Substring(0, dotasmx + 5);
    string pathInfo = context.Request.Path.Substring(dotasmx + 5);
    context.RewritePath(path, pathInfo, context.Request.Url.Query);
}