首页 新闻 会员 周边 捐助

win7+iis7+ASP.NET URL重写实现伪静态,调试OK,但发布就报 404错误,求高人解答,谢谢!

0
悬赏园豆:80 [已关闭问题] 关闭于 2014-05-13 17:23

win7+iis7+ASP.NET URL重写实现伪静态,调试OK,但发布就报 404错误,求高人解答,谢谢!

注:网上很多方法都试过了就是不行

 

梦在旅途的主页 梦在旅途 | 初学一级 | 园豆:10
提问于:2014-05-13 17:03
< >
分享
所有回答(1)
0

已自行解决,解决方法如下:(主要是配置文件)

<compilation debug="true" targetFramework="4.0" >
<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
<httpModules>
<add type="URLRewriter.ModuleRewriter,URLRewriter" name="ModuleRewriter" />
</httpModules>

<system.webServer>
<handlers>
<add name="Html-Integrate" path="*" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" preCondition="integratedMode" />
<!--<add name="html-64" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness64" />-->
<!--<add name="all-64" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness64" />-->
<add name="all" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
<add name="HmlHandler" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
<modules>
<add name="all" type="URLRewriter.ModuleRewriter" preCondition="managedHandler" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>

梦在旅途 | 园豆:10 (初学一级) | 2014-05-13 17:23
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册