Неизвестный веб-метод. Имя параметра: methodName

При исследовании этой проблемы большинство вопросов SO касалосьstatic метод как исправить.

Так как он не работает с реальным (и немного изощренным) WebMethod, я только что создал простой для проверки возможности достижения самого метода.

[WebMethod]
[ScriptMethod(UseHttpGet = false)]
public static string HelloWorld()
{
    return "Hello World!";
}

Звонок.

<script>
    $(document).ready(function () {
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "usersWebMethods.aspx/HelloWorld",
            dataType: "json",
            success: function (data) {
                alert(data.d);
            }
        });
   });
</script>

Это всегда сводится к500 (Internal Server Error)

Unknown web method HelloWorld.
Parameter name: methodName
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Exception Details: System.ArgumentException: Unknown web method HelloWorld.
Parameter name: methodName

Почему это не удается?

Ответы на вопрос(5)

Ваш ответ на вопрос