1
I have a simple application with Webforms, I created some methods that I will access via Ajax via Ajaxpro DLL.
I used the attribute [AjaxPro.AjaxNamespace("Teste")]
in class and the [AjaxPro.AjaxMethod]
in the way.
I registered the class in Ajaxpro AjaxPro.Utility.RegisterTypeForAjax(typeof(Teste))
In javascript set the method call Teste.MetodoTeste().value
And on web.config set the Ajaxpro configuration this way:
<add verb="POST,GET" path="/ajaxpro/*.ashx" name="AjaxPro" type="AjaxPro.AjaxHandlerFactory,AjaxPro" />
In Visual Studio itself, when I run the application, using IIS Express, the method is called correctly and I can take the return quietly.
The question is, why when I publish the application on IIS Local the system no longer locates Ajaxpro?
I get several errors:
Failed to load Resource: the server responded with a status of 404 (Not Found)
and
Index.aspx:66 Uncaught Referenceerror: Teste is not defined(...)
in the browser console.
Didn’t you forget to register the type of your class for the
AjaxPro
? Example:Utility.RegisterTypeForAjax(typeof(Teste), Page)
– Ricardo Pontual
I registered, sorry I forgot to say. However it was different from your suggestion: Ajaxpro.Utility.Registertypeforajax(typeof(Test));
– Vitor Ferreira
The DLL was sent at the time of publication?
– Jéf Bueno
Yes, Ajaxpro.dll is in the project bin folder in the virtual directory that IIS created.
– Vitor Ferreira