WebMethod not called (triggered) by PageMethod in Visual Studio 2013

痞子三分冷 提交于 2019-11-29 14:34:05

I found the solution to my problem: What prevented the WebMethod was called was the reference to "System.Web.Optimization". Not sure how he does it, but as I will not use it at the time, decided to remove:

"System.Web.Optimization" and "Microsoft.AspNet.Web.Optimization.WebForms"

It is also necessary to remove the web.config as follows:

<namespaces>
    <add namespace="System.Web.Optimization" />
</namespaces>

<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" 

namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />

<dependentAssembly>
        <assemblyIdentity name="WebGrease" culture="neutral" 

publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>

All ok now! Thanks to everyone who helped me with the problem! :)

Babloo Singh

Add this section in web.config after httpModules.

add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!