我在部署我用ImageResizer做的一个小测试项目时遇到了问题。
它基本上是你可以拥有的最简单的版本,只需几个html页面,然后是ImageResizer插件。
当我从Visual 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>我已经验证4.6.1安装在服务器上(WindowsServer2012R2),IIS8.5应用程序池被设置为Integrated+ .net CLRVersion4.0.30319。
我也尝试过使用经典模式,但它也不起作用。
发布于 2016-05-04 23:43:17
显然,这是一个非常基本的设置,与ImageResizer没有任何关系。
这个问题的答案可以找到here (没有打开IIS服务器的应用程序开发)
https://stackoverflow.com/questions/37039626
复制相似问题