Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 8 of 8

Thread: Question about home page of admin section

  1. #1
    jjdunkel is offline Member
    Join Date
    Jan 2006
    Location
    Chicago
    Posts
    78

    Default Question about home page of admin section

    This works fine on my development machine, but when I run the site in my shared hosting environment I get the following error. All the menus at the top of the admin home page work and I seem to be able to navigate around just fine, the error only shows on the admin home page.

    Code:
    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.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    
    Source Error:
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace:
    
    [SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
       System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
       System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +284
       System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69
       System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +150
       System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +30
       System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +40
       System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +123
       System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +54
    Thank you in advance for any ideas you can give me

  2. #2
    jjdunkel is offline Member
    Join Date
    Jan 2006
    Location
    Chicago
    Posts
    78

    Question

    All the searches I do on this error seem to point to problems with using Reflection on a Medium Trust server. I thought AspDotNetStorefront got rid of the Medium Trust issues with the 7.0.2.5 version? Why is the admin home page the only place I've seen this error so far?

  3. #3
    jsimacek is offline Senior Member
    Join Date
    Dec 2008
    Location
    Phoenix, AZ
    Posts
    373

    Default

    Please tell your host about this, they will switch the trust level of your site and after IIS restart (they usually schedule it overnight) it will be ok ;-)
    Jan Simacek - Compunix, LLC
    AspDotNetStorefront trusted Devnet Partner and Reseller since 2005

    AspDotNetStorefront Mods and Add-Ons at http://www.ecommercecartmods.com/
    - Searching, Filtering and Sorting (like cSearch, Dealer Locator, Price Ranges, Blog)
    - Reports (like Cart Abandonment and Net Sales)
    - Customer Experience (like Question/Answers)
    - Site and Data Management (like Entity Product Mapper, Bulk Updaters, Make/Model/Year filters)

  4. #4
    jjdunkel is offline Member
    Join Date
    Jan 2006
    Location
    Chicago
    Posts
    78

    Default

    My host is using Medium Trust and will not increase to Full Trust on shared hosting environments. Besides there should be no reason for anything to run needing more than Medium Trust.

  5. #5
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    If you're using 7025SP1, then it should work on such trust. Anyway, please also check if you have given ASP.Net Process Account or Network Service a read permission to your Admin directory.

  6. #6
    jjdunkel is offline Member
    Join Date
    Jan 2006
    Location
    Chicago
    Posts
    78

    Default

    I'm using ML 8.0.1.2 C#.

  7. #7
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    The more it should work on that build. Did you check the permission given to that folder?

  8. #8
    jjdunkel is offline Member
    Join Date
    Jan 2006
    Location
    Chicago
    Posts
    78

    Default

    I was able to verify that Network Service did have read access to the admin folder. Even better I was able to convince my host to give me Full Trust even though it didn't look like they wanted to. The error was gone as soon as Full Trust was enabled.