惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - bartholomew

new作为修饰符时的使用,以及接口的显式实现 Silverlight 2 Beta 1在Firefox下显示时的一点小问题~ Visual Studio也有调试禁区?! 关于SQL Server 2005的版本号 使用动态SQL的一点小技巧 通过本地IIS SMTP服务器发送邮件时提示“邮箱不可用”的解决办法 使用System.Net.Mail.SmtpClient发送邮件时出现的乱码问题 写代码的心情 在XP上安装SQL Server 2000、Visual studio .net 2003、Visual studio 2005、SQL Server 2005…… XPS M1210到了~~~~ 在dell的网上订购了XPS M1210,耐心等待中…… 对PropertyGrid控件中PropertyValueChanged事件的探讨 关于邮件群发 关于Dotnet中的线程池 Dotnet中强行关闭多线程应用程序的所有线程 工作之余,自省~ 创建某控件的线程之外的其他线程试图调用该控件引发的问题 古怪的ConfigurationManager类 多线程编程中Join与WaitOne的区别
关键词:应用程序扩展,通配符应用程序映射
bartholomew · 2008-05-29 · via 博客园 - bartholomew

在IIS 6.0中,有两项设置,一直让我比较困惑,虽然项目中都有用到过,但总感觉对它们的认识比较模糊,那就是“应用程序扩展” 和 “通配符应用程序映射”。

前几天,利用项目的间隙,在网上查了一些资料,结合自己项目中的应用,对这两项设置有了一些初步的认识,现在整理出来,和大家一起探讨:

  1. 在“应用程序扩展”中,可以设定对特定扩展名的请求的处理方式,比如.aspx,.ascx,.asmx,.ashx这几个都设定为由“c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll”来处理。我们可以添加一个新的扩展名,如.happy,也将它交给“c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll”来处理。
  2. 在“应用程序扩展”中,添加新的映射时,扩展名一栏不能直接填“.*”,而只能填写形如“.aspx”之类具体的扩展名,这就是“通配符应用程序映射”的用处了。插入一个“通配符应用程序映射”后,比如,插入“c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll”,则所有扩展名的请求都会由“c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll”来处理。
  3. 当我们在“应用程序扩展”中添加了对应于.happy扩展名的映射,或者干脆直接添加了“通配符应用程序映射”后,在地址栏中直接输入形如“http://localhost/WebApplication1/haha.happy”的请求时,还是会报错,因为“c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll”默认也没有提供对.happy这种请求的处理,所以,我们还需要在web.config文件中添加用来处理.happy请求的handler,比如:                                            <httpHandlers>
              <add verb="*" path="*.happy" validate="false" type="WebApplication1.MyHandler, WebApplication1"/>
    </httpHandlers>当然,其中的WebApplication1.MyHandler这个类是需要我们自己写的,实现IHttpHandler接口即可。