Copied to clipboard

Flag this post as spam?

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


  • Niklas Hjelm 104 posts 125 karma points
    Jan 01, 2011 @ 11:39
    Niklas Hjelm
    0

    Security Exception using Imagegen

    I'm getting the following problem when trying to render a image with Imagegen. Using the 2.2 update for Imagegen and Umbraco 4.5.2.

    Security Exception

    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

    Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    I don't have medium trust set in my web.config. 

    My XSLT file looks like this:

          <img>
            <xsl:attribute name="src">
                <xsl:text>/umbraco/ImageGen.ashx?image=</xsl:text>
                <xsl:value-of select="$mediaNode/umbracoFile" />

                <xsl:text>&amp;width=520</xsl:text>
                <xsl:text>&amp;compression=80</xsl:text>
                <xsl:text>&amp;constrain=true</xsl:text>
                </xsl:attribute>
        </img>

    What could be the cause of this?

    Thanks

    / Niklas

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 01, 2011 @ 12:54
    Aaron Powell
    0

    I think ImageGen requires full trust, refer to the ImageGen doco for what ASP.Net trust level required is and ensure your matching it.

    Also, please direct questions relating to ImageGen to the ImageGen support forum - http://our.umbraco.org/projects/website-utilities/imagegen/imagegen-bugs

     

Please Sign in or register to post replies

Write your reply to:

Draft