简体   繁体   中英

ASP.Net URL Rewrite on IIS 7

My web application has used a URL-Rewrite module, it work well on IIS 6. But when I migrate to IIS 7 and configure the managed pipeline mode to "classic" then the URL-Rewrite module does not work. Web Sever return "configuration error" with message "... does not implement IHttpHandlerFactory or IHttpHandler".

This is the configuration information:

<system.web>
    .....
    <httpHandlers>
      <add verb="*" path="*.viss" type="CMS.URLRewriter.ModuleRewriter, CMS" />
    </httpHandlers>
</system.web>
<system.webServer>
    ......        
    <handlers>
         <add name="viss" path="*.viss" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
    </handlers>
</system.webServer>

Please help me!

The config looks right and I just tried it for my site running in the Classic app pool and it worked. Two things you can try here:
1) restarting your app pool after you change the pipeline mode
2) in case you run on 64bit machine, enabling 32bit apps under your app pool, sicne you mention bitness32:
appcmd.exe set config -section:system.applicationHost/applicationPools /[name='MySite'].enable32BitAppOnWin64:"True" /commit:apphost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM