我試圖從this Url Rewriting文章實現方法3。無法識別的配置節重寫器
我已經添加了所有必要的配置(在web.config中的UrlRewriter模塊),但是當我嘗試在web.config中添加此:
<configuration>
<configSections>
<sectionGroup>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</sectionGroup>
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" />
</rewriter>
</configuration>
它給了我:
無法識別的配置節 重寫......
請讓我知道我爲什麼告訴我,我放錯了地方,重寫XML節點?
謝謝...
解決方案:我已經把部分節點sectionGroup下,同時它有直屬configSections是
嗨...我;我添加了從蘇格蘭人採取的整個xml,我也放在我的web.config中。奇怪的是,是配置的直接子節點... –
2010-06-03 20:55:56
你是某種正確的......我把它放在錯誤的地方.. – 2010-06-03 20:59:44