This project has moved. For the latest updates, please go here.

error This method is either not marked with an AjaxMethod in web farm


I am using AjaxPro2 in a webfarm.
This is what I have in the web.config (Framework 2.0) to use AjaxPro
    <!-- Registro  del Manejador Ajax -->
    <add verb="GET, POST" path="AjaxPro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
This HttpCompressionModule is only working for requests in "ajaxpro" folder. The module
is available for ASP.NET 2.0.-->
<add name="HttpCompressionModule" type="AjaxPro.HttpCompressionModule,AjaxPro.2"/>
And this source code in the Page_load event
Namespace MantenimientoCeR
Partial Class CalculoCeR
    Inherits PaginaBase
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
And also I have some WebMethods like this:
<AjaxPro.AjaxMethod()> Public Function DevolverPais(ByVal codigoPais As String) As String
I do not know why sometimes when I call these Server Methods, the return objects returns this error: "{"error":{"Message":"This method is either not marked with an AjaxMethod or is not available.","Type":"System.NotSupportedException"}}".
Others, the .ashx javascript that manage the ajax of this page is not created.
Can someone help me?


wrote Mar 21, 2014 at 11:51 AM

Is it only related if you put the web site in a web farm, or do you have the same problem on a single server, too?

wrote Mar 21, 2014 at 11:51 AM

vitxu wrote Mar 23, 2014 at 9:41 AM

We know now what was happening. The load balancer was failing and closing sessions, that's all.
Thank you.