小弟用的是微软的msdn上的控件
http://msdn2.microsoft.com/zh-cn/library/ms972974.aspx 其中有两个组件 ActionlessForm.dll , URLRewriter.dll
但是好像是VS2003的.当我把这两个Dll组件放到工程bin目录下 , 运行时缺出现一下消息
消息 1 未能找到元素“RewriterConfig”的架构信息。
消息 2 未能找到元素“Rules”的架构信息。
消息 3 未能找到元素“RewriterRule”的架构信息。
消息 4 未能找到元素“LookFor”的架构信息。
消息 5 未能找到元素“SendTo”的架构信息。
消息 6 未能找到元素“RewriterRule”的架构信息.
.....
运行时也无法跳转页面,报出以下错误无法找到资源。
说明: HTTP 404。您正在查找的资源(或者它的一个依赖项)可能已被移除,或其名称已更改,或暂时不可用。请检查以下 URL 并确保其拼写正确。 请求的 URL: /WebSite2/Products/Default/.aspx
我Web.Config中是这样写的,
<?xml version="1.0" encoding="utf-8" ?>
<configuration> <configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/(\d{2})\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1&month=$2&day=$3</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/Default\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1&month=$2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/Default\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
</RewriterRule>
<!-- Rules for Product Lister -->
<RewriterRule>
<LookFor>~/Products/Default\.aspx</LookFor>
<SendTo>~/Default2.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Beverages\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Condiments\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Confections\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=3</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Dairy\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=4</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/GrainsCereals\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=5</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/MeatPoultry\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=6</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Produce\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=7</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Seafood\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=8</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig> <system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
</httpModules>
<authentication mode="Forms"/>
</system.web>
</configuration>
希望各位大哥,大姐能帮小弟一把
http://msdn2.microsoft.com/zh-cn/library/ms972974.aspx 其中有两个组件 ActionlessForm.dll , URLRewriter.dll
但是好像是VS2003的.当我把这两个Dll组件放到工程bin目录下 , 运行时缺出现一下消息
消息 1 未能找到元素“RewriterConfig”的架构信息。
消息 2 未能找到元素“Rules”的架构信息。
消息 3 未能找到元素“RewriterRule”的架构信息。
消息 4 未能找到元素“LookFor”的架构信息。
消息 5 未能找到元素“SendTo”的架构信息。
消息 6 未能找到元素“RewriterRule”的架构信息.
.....
运行时也无法跳转页面,报出以下错误无法找到资源。
说明: HTTP 404。您正在查找的资源(或者它的一个依赖项)可能已被移除,或其名称已更改,或暂时不可用。请检查以下 URL 并确保其拼写正确。 请求的 URL: /WebSite2/Products/Default/.aspx
我Web.Config中是这样写的,
<?xml version="1.0" encoding="utf-8" ?>
<configuration> <configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/(\d{2})\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1&month=$2&day=$3</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/Default\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1&month=$2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/(\d{4})/Default\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
</RewriterRule>
<!-- Rules for Product Lister -->
<RewriterRule>
<LookFor>~/Products/Default\.aspx</LookFor>
<SendTo>~/Default2.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Beverages\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=1</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Condiments\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Confections\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=3</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Dairy\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=4</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/GrainsCereals\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=5</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/MeatPoultry\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=6</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Produce\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=7</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Products/Seafood\.aspx</LookFor>
<SendTo>~/ListProductsByCategory.aspx?CategoryID=8</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig> <system.web>
<httpModules>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
</httpModules>
<authentication mode="Forms"/>
</system.web>
</configuration>
希望各位大哥,大姐能帮小弟一把
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
</httpModules>
要放到 <system.web></system.web>节点外