asp.net – 通配符HttpHandler不处理静态文件

前端之家收集整理的这篇文章主要介绍了asp.net – 通配符HttpHandler不处理静态文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我看了一些较老的问题,但我找不到任何东西.

我在我的网络应用程序上有一个Wildcard HttpHandler,正在处理网址并确定它是否能用它做任何事情

如果它不能,那么StaticFile Handler应该把它拿起来,然后将它作为静态文件(如html文件)提供.

问题是,它通过通配符处理程序,然后似乎没有去StaticFileHander.我需要对Wildcard处理程序或Web配置做些什么吗?

这是我的web.config:

<add name="Wildcard" path="*" verb="*" type="Rewriter.RewriterHttpModule"
 modules="IsapiModule"  requireAccess="None" allowPathInfo="false" 
 preCondition="" responseBufferLimit="4194304" />

<add name="StaticFile" path="*.*" verb="*" 
 modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" 
 scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" 
 resourceType="File" requireAccess="Read" allowPathInfo="false" preCondition="" 
 responseBufferLimit="4194304" />

解决方法

也许您的HttpHandler应该明确地将请求传递给StaticFileHandler.
原文链接:https://www.f2er.com/aspnet/245254.html

猜你在找的asp.Net相关文章