当前位置:web 服务器 > IIS >>

ashx在 IIS7下404 解决方法

iis7时移到这个位置,并且加个name属性:

 

   

<handlers>
      <remove name="webservicehandlerfactory-integrated"/>
      <remove name="scripthandlerfactory" />
      <remove name="scripthandlerfactoryapps教程ervices" />
      <remove name="scriptresource" />
      <add name="text" verb="*" path="text.ashx" type="webapplication1.texthandler, webapplication1" />
      <add name="file" verb="*" path="file.ashx" type="webapplication1.filehandler, webapplication1" />
      <add name="scripthandlerfactory" verb="*" path="*.asmx" precondition="integratedmode"
           type="system.web.script.services.scripthandlerfactory, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"/>
      <add name="scripthandlerfactoryappservices" verb="*" path="*_appservice.axd" precondition="integratedmode"
           type="system.web.script.services.scripthandlerfactory, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"/>
      <add name="scriptresource" precondition="integratedmode" verb="get,head" path="scriptresource.axd" type="system.web.handlers.scriptresourcehandler, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" />
    </handlers>

 

看到加粗的部分就是自己加的,如果上虚拟主机发现一种情况不行,估计就是iis的版本问题了,换另一种即可。不过我发现在两个位置都配置一下就兼容了两个版本的iis,这可是个好消息

补充:asp.net教程,.Net开发 
Apache
IIS
Nginx
Tomcat
如果你遇到web 服务器难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,