ImageResizer部署集成模式

时间:2016-05-04 23:10:07

标签: asp.net iis-8 imageresizer integrated-pipeline-mode

我在使用ImageResizer部署一个小测试项目时遇到了问题。

它基本上是一个最简单的版本,您可以使用几个html页面,然后是ImageResizer插件。

当我从Visual Studio 2013运行它时,它在本地工作,但在发布到服务器之后,我得到的全部是500错误(即使启用了详细的错误消息)。

我无法看到resizer.debug.ashx页面,所以这是一个非常基本的设置问题。

我的web.config文件看起来像这样(在VS和服务器上):

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="resizer" type="ImageResizer.ResizerSection,ImageResizer" />
  </configSections>

  <resizer>
    <!-- Unless you (a) use Integrated mode, or (b) map all reqeusts to ASP.NET, 
     you'll need to add .ashx to your image URLs: image.jpg.ashx?width=200&height=20 -->
    <pipeline fakeExtensions=".ashx" />

    <plugins>
      <!-- <add name="DiskCache" /> -->
      <!-- <add name="PrettyGifs" /> -->
    </plugins>
    <!--<sizelimits imageWidth="0" imageHeight="0" totalWidth="4096" totalHeight="4096" totalBehavior="throwexception"/>-->
  </resizer>
  <system.web>
    <compilation debug="true" targetFramework="4.6.1"/>
    <httpRuntime targetFramework="4.6.1"/>
  </system.web>  
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <!-- This is for IIS7+ Integrated mode -->
      <add name="ImageResizingModule" type="ImageResizer.InterceptModule"/>
    </modules>
  </system.webServer>
</configuration>

我已经验证服务器(Windows服务器2012R2)上安装了4.6.1,并且IIS 8.5应用程序池设置为集成+ .net CLR版本4.0.30319。

我也试过玩经典模式,但它也不起作用。

1 个答案:

答案 0 :(得分:0)

显然,这是设置的基础,与ImageResizer没有任何关系。

可以找到问题的答案here(缺少启动IIS服务器的应用程序开发)

相关问题