我现在做的一个网站,在本地测试的时候,可以实现,为什么到万网上实现不了了,万网提供的有他的重写组件,是我用的组件个万网上的不一样的原因还是我的web.config 文件必须按照他们的方式来写?我的config文件时这样写的,大大们帮我看看是什么原因:
<?xml version="1.0"?>
<configuration>
<!--设置地址重写组件-->
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
<!--注意不要放到sectionGroup节点内-->
</configSections><!--地址重写规则-->
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->
<RewriterRule>
<LookFor>~/index.html</LookFor>
<SendTo>~/index.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/About_(.+).html</LookFor>
<SendTo>~/About.aspx?class=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<!--<rewriter file="~/xml/rewrite.xml"/>-->
<!-- appSettings网站信息配置-->
<appSettings>
<add key="Configpath" value="~/XmlConfig/webset.config"/>
<add key="DbPath" value="~/App_Data/#DtCms.mdb"/>
</appSettings>
<!-- 数据库连接字符串-->
<connectionStrings>
<add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="/>
</connectionStrings>
<system.web>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="false">
<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
<!--
通过 <authentication> 节可以配置 ASP.NET 用来
识别进入用户的
安全身份验证模式。
-->
<authentication mode="Windows"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
<httpRuntime maxRequestLength="20480" executionTimeout="600"/>
<!--httpModules
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<!--<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="URLRewriter"/>
</httpModules>-->
<pages/>
</system.web>
</configuration>前台页面链接后缀.html写的 都帮忙看看啊 在线等!
<?xml version="1.0"?>
<configuration>
<!--设置地址重写组件-->
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
<!--注意不要放到sectionGroup节点内-->
</configSections><!--地址重写规则-->
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->
<RewriterRule>
<LookFor>~/index.html</LookFor>
<SendTo>~/index.aspx</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/About_(.+).html</LookFor>
<SendTo>~/About.aspx?class=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<!--<rewriter file="~/xml/rewrite.xml"/>-->
<!-- appSettings网站信息配置-->
<appSettings>
<add key="Configpath" value="~/XmlConfig/webset.config"/>
<add key="DbPath" value="~/App_Data/#DtCms.mdb"/>
</appSettings>
<!-- 数据库连接字符串-->
<connectionStrings>
<add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="/>
</connectionStrings>
<system.web>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="false">
<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
<!--
通过 <authentication> 节可以配置 ASP.NET 用来
识别进入用户的
安全身份验证模式。
-->
<authentication mode="Windows"/>
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<globalization requestEncoding="gb2312" responseEncoding="gb2312"/>
<httpRuntime maxRequestLength="20480" executionTimeout="600"/>
<!--httpModules
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<!--<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="URLRewriter"/>
</httpModules>-->
<pages/>
</system.web>
</configuration>前台页面链接后缀.html写的 都帮忙看看啊 在线等!
解决方案 »
- asp.net sql server 数据库连接失败 Login failed for user“”
- 如何实现导航菜单各页面共同调用,且,菜单能接收各页面传来的参数?
- HTML select控件的跳转问题~~~请教高手~~~
- 如何将图片转换为视频文件
- 请用过FCKeditor的朋友指点一下...
- 求助!!!!ASP。NET中怎么批量添加数据
- 我要在datagrid中的每行数据 显示这个节点的内容,该怎么做?
- 安装asp.net应用程序时提示"系统无法打开指定的设备或文件!"
- dropdownlist的问题 在线等
- VISIO产品 和 VS.net 是什么东西啊能给我说一下吗?谢谢。
- 求教关于读取Excel表的问题
- ASP.NET会被MVC给淘汰掉吗?
<rule name="rule10" stopProcessing="true">
<match url="^Article/([0-9]+).html" />
<action type="Rewrite" url="Article.aspx?id={R:1}" />
</rule> 该怎么改? 还有 分页的话该怎么写 我用的是分页控件