ajaxpro组件在windows2008 + IIS7 下不能正常使用的问题

原先在Win2003+Asp.Net2.0运行环境下正常的网站(使用了AjaxPro),转到Vista下发现无法正常运行,总是报XX未定义(XX为使用了AjaxPro的页面的类名)。

后来在网上找到了解决方法:

在web.config中关于AjaxPro的设置,在IIS7.0(Vista中使用的为IIS7.0)下需要在

<system.webServer><handlers>下增加节点

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

而且在配置文件中是有提示的:

 <!--
        在 Internet 信息服务 7.0 下运行 ASP.NET AJAX 需要 system.webServer
        节。对早期版本的 IIS 来说则不需要此节。
    -->

只是需要注意的是,在system.webServer这个节,而不是system.web节。

如果修改了配置文件还是有问题,就只能把应用程序池改为“经典模式”试试了。

Thanks. That explains everything. Please move the <add> element to be
under <handlers>.

In Integrated mode, Managed Code extensibility reads handlers from
system.webServer/handlers section. In classic mode, ASP.Net will read
handlers from system.web/httpHandlers section (since that's what it
did on prior versions of IIS).

You must have turned off IIS7's Configuration Validation Module since
that module warns you when you have a dependency on <httpHandler>
while IIS7 is in Integrated Mode and would give you the exact command
to migrate your current configuration into Integrated Mode which works
(most of the time, anyway...).

Now, we could have implemented IIS7 in such a way that the above
mentioned migration "just works" (sorta, with caveats that I'll skip
over unless you're really interested in the details), but we decided
for a cleaner IIS7 implementation based on user intention with
confusion up front, I think it's better for the long term that users
know what they are configuring instead of IIS magically doing little
tweaks here and there which generate usability legacy for future IIS
versions.

request processing (just about all the hacks and hoops that you *used*
to jump through with ASP.Net 2.0 + IIS 6.0 by configuring
aspnet_isapi.dll as wildcard application mapping and extending
DefaultHttpHandler are not necessary and actually does not work and
can break IIS7).

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hbu_dcf/archive/2010/06/22/5686024.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值