【问题标题】:javascript post 500 serrver internal errorjavascript post 500 服务器内部错误
【发布时间】:2013-04-23 20:50:04
【问题描述】:

我正在使用 ajax 和 web 方法,当我执行此代码时出现错误 发布 POST 500(内部服务器错误) 但是这条路存在!!!

这段代码是我现在正在使用的

function fnSendID() {

        $.ajax({
            type: "POST",
            url: "GMap.aspx/SendCommands",
            data: '{IDMobile: "'+$("#<%=Ddl_MobileCustomer.ClientID%>").val()+'"}',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (response) {

                console.log("Entro : " + response.d);
            },
            failure: function (response) {
                console.log("Fallo : " + response.d);
            }
        });

<WebMethod()> _
    Public Shared Function SendCommands(ByVal IDMobile As String) As String
        'iIDMobile = GetMobileID(iIDMobile)
        Dim sResponse As String = IDMobile + "Buenas"
        Return sResponse
    End Function

【问题讨论】:

    标签: asp.net ajax webmethod


    【解决方案1】:

    500 表示您点击的路径在服务器端导致错误,而不是路径不存在。

    【讨论】:

    【解决方案2】:

    调试代码并在 Dim sResponse As String = IDMobile + "Buenas" 处设置断点。 它到达这里了吗?退货前有什么异常吗?

    【讨论】:

      猜你喜欢
      • 2018-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-24
      • 2020-10-01
      • 2018-01-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多