locked
[Ajax.AjaxMethod()] Not working in Visual studio 2013 RRS feed

  • Question

  • User718865757 posted

    Hi,

    I am Upgrading my project from VS2010 to VS2013.

    I am calling Ajax methods from Javascript. By using [Ajax.AjaxMethod()] in .cs page.

    In 2010 its working fine.

    But in 2013 its giving errors as below 

    Failed to load resource: the server responded with a status of 404           ajax/common.ashx not found.

    But in our Application ajax folder it self not there.

    In Web.config we added below code

    <location path="Ajax" inheritInChildApplications="false">
        <system.web>
          <httpHandlers>
            <remove verb="*" path="*.asmx" />
            <add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
          </httpHandlers>
        </system.web>
        <system.webServer>
          <handlers>
            <remove name="Ajax" />
            <add name="Ajax" verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax" />
          </handlers>
        </system.webServer>
      </location>

    Even though I am getting same error. 

    Then i tried to replace the dll's with latest .net 4.5 ajaxtoolkit Dll's, Tried installing AjaxToolkit via Nuget... Still no luck.

    All Ajax methods are not working.

    Please help me.

    Thanks,

    Shivanag.

    Tuesday, November 25, 2014 9:31 AM

All replies