【问题标题】:DotNetNuke redirects when calling ImageResizer with fake extension使用假扩展名调用 ImageResizer 时 DotNetNuke 重定向
【发布时间】:2014-06-10 21:09:55
【问题描述】:

我已经在我的 DotNetNuke 环境中安装了 ImageResizer 库,如 http://imageresizing.net/docs/workswith/dotnetnuke 所述

但我一调用调整器扩展程序就会被重定向到门户的根目录

我在 web.config 中的调整大小设置与安装指南中的示例完全相同

<resizer>
    <pipeline fakeExtensions=".ashx" />
    <plugins>
        <add name="MvcRoutingShim" />
        <add name="DiskCache" />
    </plugins>
</resizer>

对我来说看起来不错,但是一旦我尝试通过扩展程序调用图像,我就会被重定向到站点的根目录。

致电:

http://localhost/Portal/0/Image.jpg.ashx

重定向到:

http://localhost/

我不知道如何解决这个问题。是 DotNetNuke 还是 IIS 设置?

我已经尝试过的事情:

  • 检查了站点的配置并确保 .ashx 扩展名的“验证该文件是否存在”复选框未选中。
  • 尝试使用其他扩展程序
  • 尝试在 IIS 中添加通配符
  • 检查了 resizer.debug.ashx,

    检测到 2 个问题:

    (Warning):  To potentially see additional errors here, perform an image resize request.
    Server(Warning):    Microsoft-IIS/6.0 does not support Integrated mode or does not have it enabled.
        You must append the .ashx extension to any image requests you wish to process.
    

似乎从未调用过处理程序,并且重定向是基于没有名为 Image.jpg.ashx 的物理文件这一事实发生的。

任何想法如何解决这个问题?

【问题讨论】:

    标签: iis web-config dotnetnuke imageresizer


    【解决方案1】:

    是 SiteUrls.config 中有缺陷的重写器导致了这个问题:

    <RewriterRule>
      <LookFor>[^?]*/(\d+)/(.*)</LookFor>
      <SendTo>~/Default.aspx?tabid=$1</SendTo>
    </RewriterRule>
    

    【讨论】:

      猜你喜欢
      • 2011-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-14
      • 2013-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多