tags:

views:

2294

answers:

5

Locally my application works fine using ajaxpro, but on the server I can't seem to figure out 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

Same code works locally, so it must be a IIS7 setting?

edit, 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>
+1  A: 

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

You should have something that looks like the following in your web.config file.

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

You also need to have the AjaxPro dll in your Bin directory (for a web site, at least).

tvanfosson
+1  A: 

For AjaxPro.dll to work in IIS7 you should set your application pool's PipelinMode to Classical instead of Integrated.

I have tried everywhere to find this but at the end this was what saved me.

A: 

To run Ajax.NET on IIS7 (i.e. Windows Vista) in integrated mode instead of classic mode here are two things you have to check:

  1. First check that the IIS_ISSRS group has access to your Web site folder. If you are using the default folder for Web sites with Visual Studio .NET 2005 the simplest way is to add read access at C:\Users\Username\Documents\Visual Studio 2005\WebSites.
  2. Run following command to automatic migrate your web.config file: %windir%\system32\inetsrv\Appcmd migrate config ""

The breaking change for Ajax.NET Professional is that you have to move the httpHandler (and httpModule if used) to a new section system.webServer and rename httpHandler to handler; next you have to add a 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>
A: 

I just had the same error but probably for a different reason than you did. I got it on a new website (running locally) because the website was using a custom url rewrite module that didn't exclude .ashx!

So the solution for me was to make sure the rewrite module excluded paths with .ashx...

A: 

Hi, How I can exclude paths with .ashx in rewrite module?

thanks

Reg