Web Service method name is not valid

后端 未结 8 2973
余生分开走
余生分开走 2021-02-20 04:39

I get the following error \"Web Service method name is not valid\" when i try to call webmethod from javascript

System.InvalidOperationException: SaveBO

相关标签:
8条回答
  • 2021-02-20 05:08

    I had this issue because my soap method had a List<string> parameter. Couldn't figure out a way to make it work with the array parameter; so just converted the parameter to a &-delimited string (e.g. val1&val2&val3) and converted the parameter to an array in the service method.

    0 讨论(0)
  • 2021-02-20 05:11

    It was a silly mistake.

    remove Static keyword from method declaration.

    [WebMethod]
    public string SaveBOAT(string Pid)
    {        
         SessionManager.MemberID = Pid;
         return "";
    }
    
    0 讨论(0)
提交回复
热议问题