Environment:
.Net Framework 4.6.1
The .asmx file resides in my WebApplication project
Web Forms Project
app.js in Scripts folder
$.post("TaskServices.asmx/UpdateStatus", { 'id': 1, 'status': 1 });
Web Service asmx file
[WebMethod]
public string UpdateStatus(int id, int status)
{
TaskManager taskManager = new TaskManager();
taskManager.UpdateStatus((TaskStatuses)status, id);
return string.Empty;
}
All this works locally on my dev machine, however when I deploy to Azure I get the following error message:
Request format is unrecognized for URL unexpectedly ending in '/UpdateStatus'. at System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)