locked
Display Image Problem With Microsoft.DynamicData.ImageHandler RRS feed

  • Question

  • User-2020417325 posted

    Hi!

    I am working with the sample "DynamicDataVNextSamples". It's works fine in Visual Studio 2008 when run in debug mode, but when I put in an web aplication in IIS 6.0 the imagehandler return an 404 error.

     I follow this steps:

    1 - Open DynamicDataVNextSamples in VS2008
    2 - Build Solution
    3 - Go to IIS and create an new web aplication (admin) and select the folder "DynamicDataFuturesSample"
    4 - Run web aplication is http://localhost/admin/

    The aplication works fine... but the images show "not found" (red cross) and the image url (http://localhost/admin/ImageHandler.axd?table=products... )

    Someone had the solution for this?

    Thanks!!!

    Saturday, December 27, 2008 8:58 PM

Answers

  • User1641955678 posted

    Hi Carlos, 

    So if you directly go to the image handler (i.e. copy the image URL in the address bar), you get a 404? 

    If you go to web.config, you'll find a line that registers the ImageHandler.axd handler.  For IIS7, I think you'd need to copy this line into the <system.webServer><handlers> section, but I wouldn't think you'd need that for IIS6.

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 27, 2008 9:24 PM

All replies

  • User1641955678 posted

    Hi Carlos, 

    So if you directly go to the image handler (i.e. copy the image URL in the address bar), you get a 404? 

    If you go to web.config, you'll find a line that registers the ImageHandler.axd handler.  For IIS7, I think you'd need to copy this line into the <system.webServer><handlers> section, but I wouldn't think you'd need that for IIS6.

    David

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, December 27, 2008 9:24 PM
  • User1641955678 posted

    I tried it on Vista (which has IIS7), ans that's definitely something missing in the config file. Note that it's not an exact copy of the existing line, as you need to add a name attribute, e.g.

          <add name="ImageHandler" path="ImageHandler.axd" verb="*" type="Microsoft.Web.DynamicData.ImageHandler"/>
        </handlers>
    

     David

    Saturday, December 27, 2008 10:20 PM
  • User-2020417325 posted

     Thank you David. It works great!

    Carlos Pinto

    Monday, December 29, 2008 6:41 AM
  • User1641955678 posted

    Glad to hear that!  Just to be sure, can you confirm that you are indeed using IIS7 (e.g. on Vista or Win Server 2008) and not IIS6?  I would not expect this to be needed for IIS6.

    David

    Monday, December 29, 2008 7:26 PM
  • User-2020417325 posted

    Is II7.

     

    Friday, January 2, 2009 10:41 AM