简体   繁体   中英

ImageResizer deployment integrated mode

I am having problems with deploying a little test project I have made with ImageResizer.

It is basically the most simple version that you can have with a few html pages and then the ImageResizer plugin.

It works locally when I run it from Visual Studio 2013, but after publishing to the server then all I get is a 500 error (even with detailed error messages enabled).

I cannot see the resizer.debug.ashx page either so this is some very basic setup issue I guess.

My web.config file looks like this (both in VS and on server):

<?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>

I have verified that 4.6.1 is installed on the server (windows server 2012R2) and that the IIS 8.5 app pool is set to integrated + .net CLR version 4.0.30319.

I have tried playing around with the classic mode as well, but it does not work either.

Apparently this was something so basic with the setup and did not have anything to do with ImageResizer.

The answer to the question can be found here (was missing to turn on Application development for the IIS server)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM