gpt4 book ai didi

jquery - webservice - 未知的 Web 方法参数名称 methodname

转载 作者:行者123 更新时间:2023-11-30 23:51:38 30 4
gpt4 key购买 nike

我调用了一个网络服务来获取全日历中的项目。该方法永远不会被调用,并且 firebug 会给出以下错误:

*“POST [http]://localhost:50536/FullCalendar/ServicioFullCalendar.asmx/GetEventosCalendarioPOST [http]://localhost:50536/FullCalendar/ServicioFullCalendar.asmx/GetEventosCalendario

500 内部服务器错误 1.01秒”“未知的Web方法参数名称方法名称”*

这是 asmx.vb 代码:

    <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://localhost/uva/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class ServicioFullCalendar
Inherits System.Web.Services.WebService

<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
<WebMethod(MessageName:="ObtieneEventos")> _
Public Shared Function GetEventosCalendario(ByVal startDate As String, ByVal endDate As String) As String
Try
Return CalendarioMensualDAO.Instance.getEventos(startDate, endDate)

Catch ex As Exception
Throw New Exception("FullCalendar:GetEventos: " & ex.Message)
Finally

End Try
End Function

网络服务从完整日历“加载”如下:

events: "ServicioFullCalendar.asmx/GetEventosCalendario",

最佳答案

这是错误:该方法必须是“非共享”,并且没有“消息名称”:

<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
<WebMethod()> _
Public Function GetEventosCalendario(ByVal startDate As String, ByVal endDate As String) As String
Try
Return CalendarioMensualDAO.Instance.getEventos(startDate, endDate)

Catch ex As Exception
Throw New Exception("FullCalendar:getEventos: " & ex.Message)
Finally

End Try
End Function

关于jquery - webservice - 未知的 Web 方法参数名称 methodname,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4543347/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com