WebMethod not being called

后端 未结 4 1590
-上瘾入骨i
-上瘾入骨i 2020-12-07 02:37

I am passing a javascript variable containing a string to the server via jquery.ajax. Although the \"success\" condition is called, the server-side WebMethod is never calle

4条回答
  •  猫巷女王i
    2020-12-07 02:39

    I have encountered the same issue. After Googling, I found the solution, and it works for me. Navigate to RouteConfig.cs and comment out the line below:

    public static class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            var settings = new FriendlyUrlSettings();
            //settings.AutoRedirectMode = RedirectMode.Permanent;
            routes.EnableFriendlyUrls(settings);
        }
    }
    

提交回复
热议问题