Copied to clipboard

Flag this post as spam?

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


  • Tom Maton 387 posts 660 karma points
    Jul 25, 2010 @ 20:21
    Tom Maton
    0

    System.Security.Permissions.FileIOPermission error on Umbraco 4

    Hi All,

    I've just created a new site with Umbraco 4.0 using .NET Framework 2.0 as this is the highest version the hosting company have running on servers.

    I've also installed the Medium Trust project and I've got the editor working but when I try to create a new page, xslt, macro, change the hostnames I get the following error:

    System.Security.SecurityException:
     Request for the permission of type 
    'System.Security.Permissions.FileIOPermission, mscorlib, 
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 
    failed.

    The hosting company is 1 and 1 and there is nothing I can do to change other permissions or .NET version as its on a shared host. And so the customer service is pants so was wondering if anyone has resolved this issue themselves

    Thanks

    Tom

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jul 25, 2010 @ 23:00
    Lee Kelleher
    1

    Hi Tom,

    Definitely sounds like a Medium Trust issue, (but not sure what exactly).

    Best bet is to drop Benjamin Howarth a line and see if he can help out?

    Cheers, Lee.

  • Tom Maton 387 posts 660 karma points
    Jul 26, 2010 @ 12:46
    Tom Maton
    0

    Cheers Lee,

    I'll give Ben a shout and see if he has any ideas.

    Thanks

    Tom

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jul 27, 2010 @ 10:18
    Jamie Howarth
    0

    Hey Tom.

    On the surface of it, it would appear to be a MedTrust issue. Can you copy and paste the full stack trace here?

    Best,

    Benjamin

  • Tom Maton 387 posts 660 karma points
    Jul 27, 2010 @ 10:30
    Tom Maton
    0

    Hi Ben,

    The stack trace is as follows:

    [SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
    System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
    System.Security.CodeAccessPermission.Demand() +58
    System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +154
    System.Web.HttpRequest.MapPath(VirtualPath virtualPath) +37
    System.Web.HttpServerUtility.MapPath(String path) +99
    umbraco.cms.presentation.dashboard.OnInit(EventArgs e) +255
    System.Web.UI.Control.InitRecursive(Control namingContainer) +333
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
    System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
    System.Web.UI.Page.ProcessRequest() +80
    System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
    System.Web.UI.Page.ProcessRequest(HttpContext context) +49
    ASP.umbraco_dashboard_aspx.ProcessRequest(HttpContext context) +4
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

    Thanks for taking a look.

    Tom

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jul 27, 2010 @ 10:33
    Jamie Howarth
    0

    Hi Tom,

    Can you confirm if this is Umbraco 4.0.x or 4.5.x?

    Many thanks,

    Benjamin

  • Tom Maton 387 posts 660 karma points
    Jul 27, 2010 @ 10:37
    Tom Maton
    0

    HI Ben,

    This is Umbraco 4.0.3

    Thanks

    Tom

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jul 27, 2010 @ 10:40
    Jamie Howarth
    0

    Aha. Is is the out-of-the-box release from Codeplex? Shared hosting isn't supported with the 4.0.3 OOB release unless you have this release instead (copy and paste the DLLs over the top).

    Best,

    Benjamin

    P.S. Unsupported, use at own risk, it's a fork I made back in December for shared hosting environments.

  • Tom Maton 387 posts 660 karma points
    Jul 27, 2010 @ 10:59
    Tom Maton
    0

    Hi Ben,

    I've copied the DLLs over the top and still getting the same error.

    I've also used the config in the package. Would it be best to perform an install with this files from stratch?

    Thanks

    Tom

  • Jamie Howarth 306 posts 773 karma points c-trib
    Jul 27, 2010 @ 11:10
    Jamie Howarth
    0

    In which case it's not a MedTrust error, it sounds like it's a generic file permission error. Even with shared hosting you should still be able to specify read/write permissions on folders - can you try and find the file manager section in your hosting and see if write attributes have been allowed?

  • Nate Pickett 13 posts 33 karma points
    Aug 26, 2010 @ 21:26
    Nate Pickett
    0

    I am getting the same error but only when uploading a file under the Media section.  I am able to successfully add/delete, add/delete hostnames and publish nodes.

    I am running Umbraco 4.5.1 on Rackspace's Cloud Sites (Mosso) hosting environment.  Mosso runs windows on top of a native Unix environment. The permissions are therefore in Linux.  All of the files/folders are set to 777

    Owner (Read/Write/Execute)

    Group Permissions (Read/Write/Execute)

    Public permissions (Read/Write/Execute)

    which is equivalent to "Everyone" role with full control in Windows.  Does anyone have any suggestions on why this security permission exception is getting thrown?  Does anyone have 4.5.1 successfully running on Mosso?

    Thanks!

     

  • Nate Pickett 13 posts 33 karma points
    Sep 17, 2010 @ 20:29
    Nate Pickett
    0

    I was able to resolve my issue by having my hosting provider (Rackspace's Cloud Sites - Mosso) install symlinks.

    For complete steps, please see my post here: http://our.umbraco.org/forum/getting-started/installing-umbraco/2779-Installing-on-the-Rackspace-cloud-Mosso

Please Sign in or register to post replies

Write your reply to:

Draft