注意:先要将应用池设置为集成模式,修改OK后,再改成经典模式。否则,什么托管程序出不来。

1、新建网站,这里不做介绍,很简单。并把网站设置为集成模式

2、添加通配符脚本映射

打开之后显示如下界面,在右上角操作栏目内找到“添加通配符脚本映射”这一栏目

我是64位系统就选择了64位的.net:C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

是32就选择32位:C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

3、添加托管模块

在右上角操作里选择添加托管模块,名称填写为all,类型改为 URLRewriter.ModuleRewriter,勾选上下面仅针对asp。net应用程序或者是托管程序发出的请求调用:

4、网站应用程序池改为经典模式

5、web.config会自动生成以上设置的代码

    <system.webServer>
<handlers>
<add name="all" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
</handlers>
<modules>
<add name="all" type="URLRewriter.RewriterModule" preCondition="managedHandler" />
</modules>
</system.webServer>

6、下边是iis6,iis7,iis7.5通用伪静态代码

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!--伪静态开始-->
<configSections>
<section name="CustomConfiguration" type="URLRewriter.Config.UrlsSection, URLRewriter" />
</configSections>
<CustomConfiguration>
<urls>
<add virtualUrl="~/(\w+).html" destinationUrl="~/ceshi.aspx" />
</urls>
</CustomConfiguration>
<!--伪静态结束-->
<system.web>
<httpRuntime maxRequestLength="2097151" executionTimeout="3600" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
<compilation debug="true">
<assemblies>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<customErrors mode="Off" defaultRedirect="/404/404.htm"></customErrors>
<!--伪静态开始-->
<httpModules>
<add type="URLRewriter.RewriterModule, URLRewriter" name="RewriterModule" />
</httpModules>
<!--伪静态结束-->
</system.web>
<!--IIS7.0 begin-->
<system.webServer>
<handlers>
<add name="all" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
</handlers>
<modules>
<add name="all" type="URLRewriter.RewriterModule" preCondition="managedHandler" />
</modules>
</system.webServer>
<!--IIS7.0 end-->
</configuration>

核心注意的地方:先要将应用池设置为集成模式,修改OK后,再改成经典模式。否则,什么托管程序出不来。剩下的按照这个模式操作就可以了

Asp.Net IIS7.5伪静态设置的更多相关文章

  1. ASP.NET在IIS7.5(IIS7)配置伪静态

    http://jingyan.baidu.com/article/67508eb4ff92c69cca1ce49a.html 我相信不少站长都遇到个头疼的问题..NET如何在IIS7或者IIS7.5下 ...

  2. Windows2008R2+iis7.5环境下的dz论坛X3版伪静态设置教程

    Windows2008R2+iis7.5环境下的dz论坛X3版伪静态设置教程 因为2008R2不是那么的普及,加上X3版新出不久,所以伪静态的设置教程比较少,今天搞出来了,其实很简单,那么下面给大家简 ...

  3. Webserver asp配置及伪静态设置

    Webserver  IIS asp配置及伪静态设置 一.概述: 在Windows Server 2003系统中,用户可以借助IIS 6.0配置基于ASP.PHP.asp.NET等语言的动态Web网站 ...

  4. framework4.0 IIS7下urlrewriter设置问题

    framework4.0 IIS7下urlrewriter设置问题 http://www.cnblogs.com/litian/articles/alex.html IIS开启伪静态后html静态页面 ...

  5. Nginx/Apache之伪静态设置 - 运维小结

    一.什么是伪静态伪静态即是网站本身是动态网页如.php..asp..aspx等格式动态网页有时这类动态网页还跟"?"加参数来读取数据库内不同资料,伪静态就是做url重写操作(即re ...

  6. IIS下Asp.Net应用程序多进程设置及Session共享

    背景: 目前项目中在单个进程的应用程序经常会遇到w3c.exe崩溃的情况,于是就设想是否可以通过IIS多进程的方案来避免出现该问题. 于是搜了下“怎么实现多进程的方案”,找到了这篇文章:http:// ...

  7. asp.Net2.0中TextBox设置只读后后台获取不到值的解决方法

    http://www.cnblogs.com/yxyht/archive/2013/03/02/2939883.html   ASP.NET中TextBox控件设置ReadOnly="tru ...

  8. Phpcms V9全站伪静态设置方法

    为什么要伪静态?具体在这里就不说了,你懂的!一方面更新修改后不需要生成静态文件,另一方面为了SEO! 访问规则如下 1 2 list-{$catid}-{$page}.html content-{$c ...

  9. Ecshop导航栏标题栏的伪静态设置

    当Ecshop的伪静设置成功之后,左侧的分类标签,包括具体的产品页面都可以顺利的打开伪静态页面,但是点击导航栏,或者标题栏的时候,却还是之前的数据库标签页的方式,这是怎么一回事呢? 这是由于,Ecsh ...

随机推荐

  1. ios中文件下载(带缓存)

    使用asiHttPRequst框架 封装下载类 #import <Foundation/Foundation.h> #define FILESDOWNLOADCOMPLETE @" ...

  2. (原)linux下caffe模型转tensorflow模型

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/7419352.html 参考网址: https://github.com/ethereon/caffe- ...

  3. Safari导入书签

    1.打开Safari 这边safari会自动带出一些关联的浏览器,但如果你要导入的浏览器不在这里的话,就需要看第二步. 2.比如,这里我要从QQ浏览器导入,先打开QQ浏览器. 其他浏览器都类似,找到书 ...

  4. Eclipse导入项目时出错提示 project is missing required library

    Eclipse导入(import)项目时出错提示 project is missing required library... 以至于不能build... 然后项目会有红色感叹号: [解决办法] 右击 ...

  5. realloc 使用详解(分析realloc invalid pointer、指针无效等错误)【转】

    来源:http://www.cnblogs.com/ladd/archive/2012/06/30/2571420.htmlrealloc函数用来为ptr重新分配大小为size的一块内存,看似很简单, ...

  6. cobbler启动问题

    [root@localhost ~]# cobblerTraceback (most recent call last): File "/usr/bin/cobbler", lin ...

  7. 淘宝JAVA中间件Diamond详解之简介&快速使用 管理持久配置的系统

    http://my.oschina.net/u/435621/blog/270483?p=1 淘宝JAVA中间件Diamond详解(一)---简介&快速使用 大家好,今天开始为大家带来我们通用 ...

  8. Block(二)内存管理与其他特性-b

    一.block放在哪里 我们针对不同情况来讨论block的存放位置: 1.栈和堆 以下情况中的block位于堆中: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

  9. Fix Backup Database is terminating abnormally When performing a Farm Backup

    Problem I am trying to backup SharePoint 2013 Farm Automatically with PowerShell and Windows Task Sc ...

  10. 自动化无线网破解工具wifite2

    自动化无线网破解工具wifite2 wifite是一款自动化wifi密码破解工具,特点是支持多个wep.wpa加密的wifi网络,不支持windows和osx. wifite的特点是可以同时攻击多个采 ...