伪静态文件ISAPI安装好了,也在IIS上配置好了,Web.config文件也配置好了之后,重启IIS,再运行网站的时候,完全没有伪静态效果,还是跟没配置的时候是一样的,这是为什么?我的程序框架版本是4.0,IIS上配置的HTML后缀是2.0。 以下是代码:<?xml version="1.0" encoding="UTF-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /> </configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/n/(.[0-9]*)\.html</LookFor>
<SendTo>~/n/info.aspx?fid=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/a/(.[0-9]*)\.html</LookFor>
<SendTo>~/a/index.aspx?cid=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/(.*).html</LookFor>
<SendTo>~/$1.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<!--
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
-->
<httpRuntime requestValidationMode="2.0" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies></compilation>
<identity impersonate="false" />
</system.web>
</configuration>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" /> </configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/n/(.[0-9]*)\.html</LookFor>
<SendTo>~/n/info.aspx?fid=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/a/(.[0-9]*)\.html</LookFor>
<SendTo>~/a/index.aspx?cid=$1</SendTo>
</RewriterRule> <RewriterRule>
<LookFor>~/(.*).html</LookFor>
<SendTo>~/$1.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<!--
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
-->
<httpRuntime requestValidationMode="2.0" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies></compilation>
<identity impersonate="false" />
</system.web>
</configuration>
估计是没将ISAPI DLL文件拷贝到网站bin目录
http://www.feizhuming.net/post-23.html
你的web.config中为什么要配置?应该在ini文件中配置啊,也不用改html的处理程序啊
求解(急),在线等待ing...
那就不需要ISAPI_Rewrite了。将html的处理程序设置为.net,你的url重写都是在.net框架下的了。