ImageResizer显示错误的图像 [英] ImageResizer shows wrong image

查看:130
本文介绍了ImageResizer显示错误的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站DiskCache启用插件使用ImageResizer。随机对一些图像它显示在输出另一个文件,我应该清除缓存来解决这个问题,而经过一段时间后,我再次看到了其他的图像。错图象只是缓存的图像的一个大小

I am using ImageResizer in my website with DiskCache plugin enabled. Randomly for some images it shows another file in the output and I should clear the cache to fix this problem while after some time I see this again for other images. Wrong image is cached just for one size of the image.

还有一件事:在镀铬有时在那里图像缩放显示错误的图像此问题是由Ctrl + F5键

And one more thing: some times in chrome where image resizer shows wrong image this problem is solved by Ctrl+F5.

编辑1:
这是我的Web.config文件:

Edit 1: This is my Web.config file:

<resizer>
    <diagnostics enableFor="AllHosts" />
    <pipeline fakeextensions=".aspx" />
    <plugins>
      <add name="Mybook.utilities.ImageResizerLocalReader" />
    </plugins>
    <diskCache dir="~/imagecache" autoClean="false" hashModifiedDate="true" />
    <clientcache minutes="10080" />
</resizer>

<system.web>
    <httpModules>
      <add name="ImageResizingModule" type="ImageResizer.InterceptModule"/>
    </httpModules>
</system.web>

...

<system.webServer>
    <modules>
      <add name="ImageResizingModule" type="Mybook.utilities.ImageInterceptModule" />
    </modules>
</system.webServer>

我仍然无法看到诊断页

I still can't see diagnostic page

推荐答案

删除您的自定义插件,您的自定义的HttpHandler。

Remove your custom plugin and your custom HttpHandler.

删除

<modules>
  <add name="ImageResizingModule" type="Mybook.utilities.ImageInterceptModule" />
</modules>

替换为

<modules>
  <add name="ImageResizingModule" type="ImageResizer.InterceptModule" />
</modules>

和删除

 <add name="Mybook.utilities.ImageResizerLocalReader" />

此外,变更&LT;管道fakeextensions =ASPX/&GT; &LT;ashx的管道fakeextensions = /&GT; ,你不想与网页相冲突。

Also, change <pipeline fakeextensions=".aspx" /> to <pipeline fakeextensions=".ashx" />, you don't want to conflict with web pages.

最后,将这一到一个新的,干净的,标准的网络在应用程序本身并不映射到 C盘根:\\ 开车或做别的疯了。不要把Web应用程序根或在用户文件夹中。使用的Inetpub或 C:\\ WWW \\的myapp <​​/ code>或东西;仔细检查你的NTFS权限是否正确。

Last, move this to a new, clean, standard web application in that does not map itself to the root of the C:\ drive or do anything else crazy. Don't put web apps in the root or in a user folder. Use Inetpub or c:\www\myapp or something; double check your NTFS permissions are correct.

如果您仍然遇到问题,你已经消除了环境问题后,那么你就应该打开一个新的问题与简化再现步骤。

If you still experience the issue after you've eliminated environmental problems, then you should open a new question with simplified reproduction steps.

更新

这是由<一个引起href=\"https://stackoverflow.com/questions/32410278/using-imageresizer-with-custom-query-string/32443093?noredirect=1#comment52774132_32443093\">global变量自定义插件。

这篇关于ImageResizer显示错误的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆