Copied to clipboard

Flag this post as spam?

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


  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Sep 07, 2010 @ 14:01
    Kalle Ekstrand
    0

    ImageGen Pro crashes when changing to ApplicationPoolIdentity

    Hi there Doug,

    When we tried to change an already existing site from using "NETWORK SERVICE" to using "AplicationPoolIdentity" all the PRO features stops to work.

    We changed another site just before this one that soes not use PRO features and that one went slick.

    Any ideas?

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Sep 07, 2010 @ 14:39
    Douglas Robar
    0

    Hi, Kalle,

    When changing application pool identity you also need to change the file permissions for your site. ImageGen runs under the application pool 'owner' and needs to be able to read, write, and create files in the /data folder as well as wherever the images you are processing reside (typically the /media folder for umbraco sites).

    Please double-check your file permissions now that you've changed to the 'ApplicationPoolIdentity'. I've found this blog post very helpful to understand how to set file permissions when using the ApplicationPoolIdentity, http://stevesmithblog.com/blog/working-with-application-pool-identities/

    cheers,
    doug.

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Sep 07, 2010 @ 14:45
    Kalle Ekstrand
    0

    Hi again,

    Did that as well. but still it will not work. Also I tried to do an IIS reset but the problem is still there.

    //Kalle

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Sep 07, 2010 @ 14:51
    Douglas Robar
    0

    It may be that the /config/imagegen.config file can no longer be read and needs file permissions changed as well.

    When you check the version you should see your Pro domains listed. http://example.com/umbraco/imagegen.ashx?version If not then there is a problem with the web.config or imagegen.config file (which could certainly be file permissions-related).

    cheers,
    doug.

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Sep 07, 2010 @ 22:10
    Kalle Ekstrand
    0

    Hi Doug,

    The thing is that I have checked the permissions and everything seems to be in order.

    This is my error message for the images:

    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.

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    or:

    2) Add the following section to the configuration file of your application:

    <configuration>
       <system.web>
           <compilation debug="true"/>
       </system.web>
    </configuration>

    Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

    Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


    Stack Trace:

    [SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       ImageGen.ImageGenQueryStringParser.Process(HttpContext context) +0
       RequestHandler.ProcessRequest(HttpContext context) +36
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

     

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Sep 07, 2010 @ 22:31
    Douglas Robar
    0

    It sure looks like more changed than just the application pool's owner if you're getting a security error. Any chance you're trying to run in less than full trust? ImageGen does not yet support medium trust, for instance.

    cheers,
    doug.

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Sep 30, 2010 @ 15:07
    Kalle Ekstrand
    0

    Hello again Doug,

    Nope, it runs in full trust.

    Any more ideas? I am gonna try to change the application pool again later tonigt.

    //Kalle

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Oct 18, 2010 @ 18:12
    Douglas Robar
    0

    Hi, Kalle,

    Anything to report on this? Have you found a solution or some consistent behavior that might point in the direction of a solution?

    cheers,
    doug.

  • Kalle Ekstrand 181 posts 259 karma points c-trib
    Oct 18, 2010 @ 19:14
    Kalle Ekstrand
    0

    Hi Doug,

    No, still the same problem. I dont really know what to do.

    As for now, this is the only site running with NETWORK SERVICE instead of ApplicationPoolIdentity.

    //Kalle

  • Brendan Rice 304 posts 467 karma points
    Nov 02, 2010 @ 01:07
    Brendan Rice
    1

    Hi,

    I was hitting the same problem as Kalle and managed to resolve the issue see details below.

    1. I am running IIS7
    2. I have full trust set up in the web.config.
    3. I was still getting the error and looked at what identity the AppPool was running under, I had to change it from ApplicationPool to NetworkService

    I hope this helps

     

     

    Server Error in '/' Application.

    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.

    Source Error:

    Line 11:     {
    Line 12: ImageGen.ImageGenQueryStringParser parser = new ImageGen.ImageGenQueryStringParser();
    Line 13: parser.Process(context);
    Line 14: }
    Line 15: }


    Source File: d:\Repository\MySite\umbraco\ImageGen.ashx    Line: 13

    Stack Trace:

    [SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
    ImageGen.ImageGenQueryStringParser.Process(HttpContext context) +0
    RequestHandler.ProcessRequest(HttpContext context) in d:\Repository\MySite\umbraco\ImageGen.ashx:13
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
  • Max Öhman 42 posts 71 karma points
    Nov 29, 2010 @ 14:12
    Max Öhman
    1

    any new ideas on this?

  • Brendan Rice 304 posts 467 karma points
    Nov 30, 2010 @ 22:23
    Brendan Rice
    0

    I got it working by changing the user that the app pool runs under.

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Dec 01, 2010 @ 14:25
    Douglas Robar
    0

    What user did you change it to, out of curiosity? And what was it when it didn't run properly?

    Hard to imagine it is related (unless file-permission related) but would be nice to know just the same.

    cheers,
    doug.

  • Brendan Rice 304 posts 467 karma points
    Dec 01, 2010 @ 22:31
    Brendan Rice
    0

    Hi Doug,

    I changed it from the default IIS7 user (slipped my mind for now) to the network service, it could very well have been permissions related, but the Network Service User worked for me (I had all permissions set up for it).

    Cheers,

    B

Please Sign in or register to post replies

Write your reply to:

Draft