Click here to Skip to main content
15,885,842 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
there is a web site which was hosted in iis6 and worked very well, when i wanted to host it in iis7, I faced a lot of problems BTW .
I think the problem is about ashx files in which AjaxPro works, but iis does not let these files be loaded.
I have tried these :
1 : I've changed application pool to classic or integrated mode. ( no different)
2 : I've added this code to web config

XML
<configuration>

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

</configuration>
Posted
Updated 9-Nov-10 3:34am
v2

hello ;
Windows 2008 \ IIS 7 doesn't have the axd handler mapping set up by default for using Ajax so you need to put the following code into your web.config file if you want to use Ajax and are on one of our Windows 2008 hosting plans.


XML
<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 to the bin folder and try that:
XML
<httpHandlers>
<add verb="POST,GET" path="ajax/*.ashx" type="Ajax.PageHandlerFactory, Ajax"/>

</httpHandlers> in <system.web>
 
Share this answer
 
Comments
Jamal Seyedi 18-Dec-10 10:32am    
thanks for answring me
Ashish Dev1 29-Mar-12 7:17am    
Is your problem resolved? I had tried the solution given but problem still not resolved. Is there any other thing should be tried?
P Ranjan 30-Aug-12 3:49am    
No it does not work for me, tried the both settings in web.config. IIS7 on window7 64bit. I get the javascript alert that the class (Ajax front end wrapper for the page) was not not defined.
 
Share this answer
 
Comments
Jamal Seyedi 18-Dec-10 10:32am    
thanks for answring me
manaspal186 27-Jul-11 5:04am    
Thank you tamerqatar and Michael Schwarz
you must update AjaxPro.2 in nuget package manger.
latest version 6.10.6.2
 
Share this answer
 
Hi,

I am facing same issue.

If you have fixed this issue then please let me know asap.

Thanks,
Mayur
 
Share this answer
 
Comments
Jamal Seyedi 26-Dec-11 10:19am    
turn your apllication pool to classic mode.
Jamal Seyedi 26-Dec-11 10:20am    
and allow asapi frame work 4
Simply add new script maps in Handler Mappings of website in IIS Manager with the following:

Request Path: *.ashx
Executable: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

Mine worked with this solution.
 
Share this answer
 
This is what worked for me.  Make a <system.webserver> entry under <location path="ajaxpro"></location></system.webserver>

HTML
<location path="ajaxpro">

    <system.webserver>
      <handlers>
        <add name="AjaxPro" verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2" />
      </handlers>
    </system.webserver>
    <system.web> <!--older versions of VS support this-->
      <httphandlers>
        <add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2" />
      </httphandlers>
    </system.web>
  </location>


Add another tag at the bottom of web.config with the configuration tag:

HTML
<system.webserver>
    <modules runallmanagedmodulesforallrequests="true">
            <add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" precondition="managedHandler" />
            
    </modules>
    <handlers>
      <add name="ScriptEngine.ashx_GET" path="ScriptEngine.ashx" verb="GET" precondition="integratedMode,runtimeVersionv2.0" />
    </handlers>
        <validation validateintegratedmodeconfiguration="false" />
  </system.webserver>
 
Share this answer
 
Comments
CHill60 11-Feb-15 12:04pm    
OP accepted a solution posted over 4 years ago

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900