开发者

Having jpg and gif handled by IsapiModule in IIS7

开发者 https://www.devze.com 2022-12-19 13:54 出处:网络
I\'m struggling to get my HttpHandler to process requests for jpg and gifs. I\'ve gone to the website\'s Handler Mappings and added the following line:

I'm struggling to get my HttpHandler to process requests for jpg and gifs.

I've gone to the website's Handler Mappings and added the following line:

Path: *.jpg,*.gif
State: Enabled
Path Type: Unspecified (I've also tried setting this to File)
Handler: IsapiModule
Entry Type: Local

Running through Visual Studio works, so I know its not my code. It also works on IIS6.

I've tried setting the app up in both classic and integrated mode.

Here's the appropriate Handler mappings specified in the web.config:

<add name="*.jpg,*.gif_*" path="*.jpg,*.gif" verb="*" type="ThumbnailGenerator,Utili开发者_StackOverflow中文版ties" preCondition="integratedMode,runtimeVersionv2.0" />    
<add name="JPEG-GIF" path="*.jpg,*.gif" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />


I fixed this by clearing out the handlers from web.config, then manually adding the using IIS: [Handler Mappings] -> [Add managed handler]

I'm not sure what difference this made, because the web.config looks pretty much the same as I had setup before, but now it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号