Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adi 79 posts 183 karma points
    Jan 12, 2014 @ 19:18
    Adi
    0

    Medium trust instead of Full trust regading ImageGen?

    Hello,

    I noticed that ImageGen as one of the most popular utilities for Umbraco requires 'Full Trust' level on IIS management tool.

    My client insists on 'Medium trust' level and I will have to adopt to this request, but at the same time I would like to keep ImageGen on my clients installation of Umbraco because it is neccessary, specially for Galleries etc.

    Is it possible to solve this situation on the way that I can have 'Medium trust' level but keep the ImageGen?

    Many thanks in advance for prompt reply!

    CHeers;) Adi

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 12, 2014 @ 20:40
    Douglas Robar
    0

    Hi, Adi,

    Sorry, the need for Full Trust is for speed in some of the resizing algorithms and isn't something we'll be changing. Medium trust is dead in asp.net now, which might give you some room for discussion with your client and let you continue to use ImageGen. See https://twitter.com/LeviBroderick/status/409736021018832896. Also, Umbraco will discontinue support for medium trust with v7+ (see http://umbraco.com/follow-us/blog-archive/2013/11/21/umbraco-7.aspx and the comments)

    Otherwise, perhaps to mitigate their concerns for now, you might consider creating a separate domain and application pool (in full trust) specifically for serving images and using ImageGen on that site only, leaving the main site in medium trust. The benefit is that you'll be able to get a significant performance improvement for your website visitors because you'll have a different domain for images than other assets (html, css, js, etc) and thus can make more simultaneous requests because they are split across domains. That, too, would be a good reason to use a separate domain for ImageGen beyond any concerns about trust levels.

    cheers,
    doug.

  • Adi 79 posts 183 karma points
    Jan 13, 2014 @ 08:50
    Adi
    0

    Hello Douglas,

    thank you very much for prompt reply, I understan it now much better.

    Can you tell is the creating of a separate domain and application pool (in full trust):

    • is in cases like this where client insists on 'Medium trust' level, only and the best solution?
    • can this work on long term?
    • is it possible to applyn suggested concept for all other popular utilities beside ImageGen, XSLTsearch, jqGallery etc?

    Best regards, Adi

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 13, 2014 @ 09:37
    Douglas Robar
    0

    Hi, Adi,

    You'll have to review each tool that isn't medium-trust capable and decide what is best in each situation. For instance, XSLTsearch can be easily replaced with ezSearch, which supports medium trust to the same degree that Umbraco itself does. Can't help you with jqGallery supports medium trust but uses ImageGen for the resizing and as we've discussed, ImageGen requires full trust. One answer won't cover every situation.

    In the case of ImageGen, I recommend having ImageGen in a separate application pool for performance reasons alone. See https://developers.google.com/speed/docs/best-practices/rtt#ParallelizeDownloads for a good discussion from google on this best practice.

    The other reason for using a separate application pool is that, for your client, they can isolate a single but important part of their site (ImageGen) running in high trust from the rest of their site, which they may want to run in medium trust. Though they may not agree to having a segregated high trust application pool in principle, they may agree for the performance reasons above, or because MS themselves have killed medium trust as mentioned earlier that they may not have been aware of (people were often told that medium trust was the only "safe" environment for so long that now people believe it even though it isn't true)

    If they simply won't agree to any high trust then you can attempt to use ImageGen in medium trust. Many algorithms are medium-trust compliant but some common ones are not. Depending on what you're trying to do with ImageGen you might be able to get enough from ImageGen even in medium trust, though there are no promises and we don't support running in medium trust. Even so, if it runs with the resizing you want (avoid .gif images, for instance) then it runs. If it gives an error you'll know that feature requires high trust. Sorry, I don't have a list of what does or doesn't require high trust.

    Hope this helps.

    cheers,
    doug.

Please Sign in or register to post replies

Write your reply to:

Draft