Ajaxpro not accessible on IIS

Asked

Viewed 150 times

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)

  • I registered, sorry I forgot to say. However it was different from your suggestion: Ajaxpro.Utility.Registertypeforajax(typeof(Test));

  • The DLL was sent at the time of publication?

  • Yes, Ajaxpro.dll is in the project bin folder in the virtual directory that IIS created.

1 answer

0


Problem solved!

In web.config the ajaxpro configuration was as follows:

<add verb="POST,GET" path="/ajaxpro/*.ashx" name="AjaxPro" type="AjaxPro.AjaxHandlerFactory,AjaxPro" />

I adjusted the path tag and the application started to work in IIS Local and IIS Express:

<add verb="POST,GET" path="*.ashx" name="AjaxPro" type="AjaxPro.AjaxHandlerFactory,AjaxPro" />

Browser other questions tagged

You are not signed in. Login or sign up in order to post.