AjaxPro works locally, but on the server I get .ashx errors

Locally, my application works fine using ajaxpro, but on the server I can not understand why it is not working.

using firebug I have the following erros:

GET prototype.ashx 404 not found GET core.ashx 404 not found GET ms.ashx 404 not found

The same code works locally, so should it be an IIS7 setup?

change my web.config

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

also have:

 <location path="ajaxpro"> <system.web> <httpHandlers> <add verb="POST,GET" path="*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro"/> </httpHandlers> <authorization> <allow users="*"/> </authorization> </system.web> </location> 

and

 <location path="ajaxpro/prototype.ashx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> <location path="ajaxpro/core.ashx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> <location path="ajaxpro/converter.ashx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> 
+6
ajaxpro
source share
7 answers

For AjaxPro.dll to work in IIS7, you must install the PipelinMode application pool in Classical instead of Integrated.

I tried everywhere to find this, but in the end it was what saved me.

+9
source share

To run Ajax.NET on IIS7 (e.g. Windows Vista) in integrated mode instead of classic mode, you need to check two things:

  • First, verify that the IIS_ISSRS group has access to your website folder. If you use the default folder for websites with Visual Studio .NET 2005, the easiest way is to add read access to C: \ Users \ Username \ Documents \ Visual Studio 2005 \ WebSites.
  • Run the following command to automatically migrate the web.config file:% windir% \ system32 \ inetsrv \ Appcmd migrate config ""

The breaking change for Ajax.NET Professional is that you need to move httpHandler (and httpModule if used) to a new system.webServer section and rename httpHandler to a handler; Next, you need to add the name attribute for the handler:

 <configuration> <location path="ajaxpro"> <system.webServer> <handlers> <add verb="*" path="*.ashx" name="AjaxPro" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2" /> </handlers> </system.webServer> </location> </configuration> 
+5
source share

I hit my head a couple of times against this problem, and I think that maybe I just found a solution ... and this is more likely, errr ... disappointment.

In web.config, system.webServer / handlers, there can be more than one element that processes * .ashx

eg:

 <add name="AjaxPro" verb="POST,GET,HEAD" path="ajaxpro/*.ashx" ... <add name="SimpleHandlerFactory-Integrated" path="*.ashx" ... <add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" ... <add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" ... 

If the ajaxpro entry is lower, it will not be used since these entries match. Moving an ajaxpro element over others may solve the problem.

I have no idea why Cassini doesn't mind, but IIS7 does ...

+2
source share

Are you sure you have handlers registered in the web.config file?

The web.config file should have something similar to the following:

 <location path="ajaxpro"> <system.web> <httpHandlers> <add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/> </httpHandlers> </system.web> </location> 

You also need to have AjaxPro Dll in your Bin directory (at least for the website).

+1
source share
 <configuration> <location path="ajaxpro"> <system.webServer> <handlers> <add verb="*" path="*.ashx" name="AjaxPro" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2" /> </handlers> </system.webServer> </location> </configuration> 

Windows 2008 \ IIS 7 does not have an axd handler mapping configured by default to use Ajax, so you need to put the following code in your web.config file if you want to use Ajax and reside on one of our 2008 Windows Hosting Plans.

 <system.webServer> <handlers> <add name="Ajax" path="*.axd" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" /> </handlers> </system.webServer> 

or copy the .dll file to the bin folder and try the following:

 <httpHandlers> <add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/> </httpHandlers> in <system.web> 
+1
source share

I had the same error, but probably for a different reason than you. I got it on a new website (running locally) because the website used a custom URL rewriting module that did not exclude .ashx!

So, the solution for me was to make sure the rewrite module excludes paths using .ashx ...

0
source share

I got this error (ajaxpro / core.ashx 404 not found) after porting my web form to MVC 4

I decided to add this line to my app_start / routeconfig

 routes.IgnoreRoute("ajaxpro/{*pathInfo}"); 

My web.config did not need additional ads, but this one

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

and, of course, a link to ajaxpro.2.dll placed in my bin folder

Hope this will be helpful!

0
source share

All Articles