Meridium: Webbplatser för offentlig sektor

URLs in ImageVault 3.4

Skrivet av Johan Magnusson den 8 juni 2010 ImageVault, EPiServer 3 kommentarer

In order to increase security and make ImageVault work better with search engines and other applications we have made some changes to the way we handle the URL's.

Both the new and the old version are based on a HttpHandler. This allows us to check access rights, make conversions and finally deliver the requested image.


The first change regard the way that the URL is formatted. The new version of the handler requires that the server is using IIS 7.0 or later, hence we can map any URL to the handler. In earlier version IIS used script maps to map file extensions to be executed by ASP.NET. A workaround to that problem was to map the handler to the name ImageVaultHandler.aspx. Since .aspx pages was already mapped to ASP.NET we could get the call thru to our own handler.

A typical URL could look like this.

http://localhost/ImageVault/Images/width_122/conversionFormatType_Jpeg/id_14/ImageVaultHandler.aspx

But since we now can map any URL to ASP.NET we can make the URL appear to be an image that is served directly by the IIS.

http://localhost/ImageVaultFiles/id_8/cf_45/TestImage.jpg

In this case we have mapped the handler against “ImageVaultFiles/*” instead.

Another change is that in the previous version it was also possible to change the URL and have the image converted to the requested format. This is not longer possible, unless the actual format has already been published. When using the API on the server side to create the URL to the image, only that specific format is marked as approved for publishing.

Diskussion

  1. Menno, den 26 augusti 2010

    It seems that I have both handlers on my web site. I upgraded from episerver 5 to 6 and then installed imagevault. Can I now remove the old handler? And does the new handler need execute permission ?

  2. Johan, den 13 september 2010

    Yes you can remove the old handler. It is not removed by the installation program, since there could be implementations that manually create urls in the old format. Please clarify the question about execute permissions?

  3. Daniel Llorente Tabor, den 14 februari 2013

    Could you give an example of the two types of web.config definitions that will result in the two different handlers? I have an upgraded site where this is probably a problem, but I can't find any description of how the XML should be configured in the two solutions. I'm actually trying to convert to the "http://localhost/ImageVaultFiles/id_8/cf_45/TestImage.jpg" format instead of the old one, but can't get it working, and I'm pretty sure that this is the reason. Thanks!

Skriv kommentar

Ange kontrollordet i textfältet nedan.

Kategorier

Arkiv