0

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)

Rod
  • 14,529
  • 31
  • 118
  • 230
  • 1
    Some old answers [here](https://stackoverflow.com/questions/657313/request-format-is-unrecognized-for-url-unexpectedly-ending-in) for checking, but not azure-related. – wazz Apr 04 '18 at 20:33
  • Yeah, this worked! The links explaining why are broken, though. Thank you! How do you put one of those duplicate indicators so I can mark it as duplicate? Or you can put it as answer and I'll mark it. – Rod Apr 04 '18 at 20:45
  • 1
    Click 'flag' under the post. If a *specific* answer helped, it might be better to post that as an answer. I'd be curious to know. Btw, did you get your previous Q answered? It was related to this (authorization error i think). – wazz Apr 04 '18 at 20:49
  • Re: previous question: I changed it from PageMethod to a web service (asmx file) and that worked. – Rod Apr 04 '18 at 20:54

0 Answers0