【发布时间】:2014-04-15 00:32:57
【问题描述】:
我的 ASP.NET 包含一个指向静态图像的 IIS 虚拟文件夹(因此提供这些图像的 HTTP 请求甚至不会触及我的应用程序)。
致在http://<server>/myAppRoot使用我的网站的网络客户:
Page1.aspx
Page2.aspx
images/MyAppLogo.png
static/file1.png <-- IIS virtual folder "static" points to D:\someOtherPath
static/file2.png
在 C:\somePath\myAppRoot: 的服务器文件系统上:
Global.asax
Page1.aspx
Page2.aspx
Web.config
bin\MyAppAssembly.dll
bin\ImageResizer.dll
images\MyAppLogo.png
服务器上其他地方的所有静态图像都位于 D:\someOtherPath:
file1.png
file2.png
我可以将 ImageResizer 添加到 ASP.NET bin 文件夹以及我自己的程序集,并将 <resizer> 标记添加到 Web.config,ImageResizer 将运行并处理来自我的实际应用程序文件夹的任何请求。我可以使用所有 ImageResizer 特技让 MyAppLogo.png 跳舞。
但 ImageResizer 无法识别拦截任何对 /static/ 虚拟文件夹的请求(该文件夹包含大量上传的图像,我想要即时使用小缩略图)。
如何配置 ImageResizer 以处理 /static/ 虚拟文件夹?
我应该补充一点,/static/ 是由我们的安装程序添加的,完全在我们的应用程序之外,而不是我应用程序的 Web.config 中的 <location> 标记。
关于如何配置 ImageResizer 以处理 /static/ IIS 虚拟文件夹的任何建议?
【问题讨论】:
标签: imageresizer