【问题标题】:ImageResizer deployment integrated modeImageResizer 部署集成模式
【发布时间】:2016-05-04 23:10:06
【问题描述】:

我在部署一个使用 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 server 2012R2)上安装了 4.6.1,并且 IIS 8.5 应用程序池设置为集成 + .net CLR 版本 4.0.30319。

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

【问题讨论】:

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


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2017-12-19
      • 1970-01-01
      • 2019-09-10
      • 1970-01-01
      • 2019-02-11
      • 2016-11-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多