1

我在部署使用 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。

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

4

1 回答 1

0

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

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

于 2016-05-04T23:43:17.900 回答