1
Vote

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

description

I am using AjaxPro2 9.2.17.1 in a webfarm.
 
This is what I have in the web.config (Framework 2.0) to use AjaxPro
<httpHandlers>
    <!-- Registro  del Manejador Ajax -->
    <add verb="GET, POST" path="AjaxPro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
</httpHandlers>
<httpModules>
<!-- 
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"/>
</httpModules>
 
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
 
        Utility.RegisterTypeForAjax(GetType(CalculoCeR))
...
 
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?

comments

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

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