我们继承了一个使用Intelligencia.UrlRewriter模块的应用程序.我们的环境虽然是IIS7.我们已经将我们的网站设置为在经典的asp.net应用程序池中运行(它可以解决很多这类问题).但是,我们仍然没有看到我们的应用中的网址被重写.
有没有人碰到这个?
egl*_*ius 21
您需要在system.webServer元素上定义配置,例如:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</modules>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
你可以保持两个配置.你现在可能拥有的是:
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
Run Code Online (Sandbox Code Playgroud)
查看http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis7/上的"将ASP.NET应用程序迁移到IIS 7.0集成mod"部分
PS.我一直在使用它,没有任何问题,只要配置在.
更新1:另请查看http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx,特别是"方法3:使用HttpModule来使用IIS7执行无扩展URL重写",因为我添加的配置具有无扩展配置.
是的,我在 Win Vista 和 IIS7 下运行的 Intelligencia.UrlRewriter 模块遇到了完全相同的问题,但是切换到经典的 asp.net 应用程序池确实解决了问题。您是否在新的虚拟目录中运行该应用程序?这有时会扰乱应用程序的根路径,这可能会影响 web.config 中的规则
| 归档时间: |
|
| 查看次数: |
12595 次 |
| 最近记录: |