Framework4.0 IIS7下urlrewriter设置问题

简介: 一、Web.config配置解决办法     直接在Web.config下 加入:    1.             2.                3.                                    说明:如果是IIS7 和 Framework 2.0时,不需要红色字体部分,把v4.0.30319改成对应的2.0的版本号。

一、Web.config配置解决办法

    直接在Web.config下 加入:

   1.<configSections>
    <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
      </configSections>

   2.<httpModules>
         <add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter" />
    </httpModules>

   3.<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
            <add name="woool1" 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="woool" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
    </handlers>
   </system.webServer>

说明:如果是IIS7 和 Framework 2.0时,不需要红色字体部分,把v4.0.30319改成对应的2.0的版本号。

        如果是IIS7 和 Framework 4.0时,红色字体部分是必须的。

二、 手动在IIS7下添加 步骤如下:

  1.打开IIS7窗口下的  处理程序映射

2.在处理程序映射下添加 *.html和*的映射

目录
相关文章
|
Windows Go
Windows 10 (IIS 10)安装Microsoft Web Farm Framework Version 2.2 for IIS7问题
But I got an error message "iis version 7.0 or greater is required to install Web Farm Framework 2.2".
2201 0
|
容器 前端开发
AutoFac+ASP.NetMvc,AspNet.Core
ASP.Net.Mvc  引用 install-package autofac install-package Mvc5 //创建一个用于注册的对象 ContainerBuilder builder = new ContainerBuilder() //获取实现类的程序集 Assembly[] assembly = new Assembly[]{Assembly.
1020 0