We've got a handler we are working on to handle image requests, but the problem is I am here on Vista (w/ IIS7 obviously) and other developers and our production servers are on Windows2003
I'm looking for a way to set up the handler in the web application so that it works no matter where the code is running at (my workstation, other workstation, or in production)
anyone have any tips on how to set this up?
"If you make it idiot proof, they'll build a better idiot"
Putting this in your web.config file will create the right mappings for IIS7 and older versions and also for both classic mode and integrated mode in IIS7
MorningZ
11 Posts
Mapping JPG and GIF so it works on all servers
Jan 11, 2007 03:46 PM|LINK
We've got a handler we are working on to handle image requests, but the problem is I am here on Vista (w/ IIS7 obviously) and other developers and our production servers are on Windows2003
I'm looking for a way to set up the handler in the web application so that it works no matter where the code is running at (my workstation, other workstation, or in production)
anyone have any tips on how to set this up?
anilr
2343 Posts
Microsoft
Re: Mapping JPG and GIF so it works on all servers
Jan 11, 2007 07:14 PM|LINK
Putting this in your web.config file will create the right mappings for IIS7 and older versions and also for both classic mode and integrated mode in IIS7
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path = "*.jpg" type="..." />
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
<add name=JPG-Integrated" verb="*" path = "*.jpg" type="..." preCondition="integratedMode"/>
<add name="JPG-ISAPI-2.0-64" verb="*" path = "*.jpg" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.Net\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64"/>
<add name="JPG-ISAPI-2.0-32" verb="*" path = "*.jpg" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.Net\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32"/>
<add name="JPG-ISAPI-1.1" verb="*" path = "*.jpg" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.Net\Framework\v1.1.4322\aspnet_isapi.dll" preCondition="runtimeVersionv1.1"/>
</handlers>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
Of course, on older IIS versions, you will also have to add a mapping to the right aspnet_isapi.dll in the metabase.
Software Design Engineer
IIS Core Server