Copied to clipboard

Flag this post as spam?

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


  • Mark Roffey 18 posts 32 karma points
    Jan 28, 2010 @ 15:58
    Mark Roffey
    0

    Medium Trust and Changing Directory Locations

    I have a website that I'm creating using Umbraco (obviously), and they've just thrown 2 curve balls at me in that

    1) The site has to run in medium trust.

    2) Any directories that require write access, must be held outside of the main website.

    to solve 2) I created virtual directories that point to directories outside, and for  the most part, that worked fine.(under full trust)

    I also installed the medium trust version, and that worked okay (although I can't use the same database as I used for the full trust version of the site?).

    But when I try both scenarios together (both under medium trust) it predictablly doesn't work.

    Is there a legitimate way that I can chamge the location of directories either via web.config or other that would work under medium trust? Typically I would only need the media and umbraco directory to have modify permissions.

    Many thanks in advance.

     

     

  • Jamie Howarth 306 posts 773 karma points c-trib
    Feb 26, 2010 @ 12:40
    Jamie Howarth
    0

    Hi Mark,

    Thanks for installing my handiwork :-)

    The biggest problem I can see is that 1) and 2) are mutually exclusive - Medium trust means that your website will not have write access outside it's root directory, period. I don't know how this is affected on virtual directories, however I know 4.1 has support for VDs, but it's still in public beta so therefore use at your own risk.

    The other problem is that technically all directories in Umbraco (or at least /App_Code, /bin, /data, /css, /masterpages, /media, /usercontrols and /xslt, if not more) require write access for packages to be installable and for people to edit CSS, master pages, XSLT macros etc. via the admin system. Furthermore, when going through the Umbraco installation sequence, the application writes to the web.config, which means that also needs to have write access (only for the IIS application pool though, so only ASP.NET can read/write to these files - malicious anonymous users accessing through IUSR can't).

    Hope this helps.

    Best,

    Benjamin

  • Sean Thompson 14 posts 34 karma points
    May 07, 2010 @ 01:29
    Sean Thompson
    0

    Hey Mark,

    Thanks for the heads up. I think this may be what we are trying to do with our company website. Our problem is this: we want to use a CDN (a cloud) to host the media of our site, and all the data (and basic framework) is hosted on the web server. Do you know where we could go about making umbraco redirect the media uploads to direct to this external clouod server?

Please Sign in or register to post replies

Write your reply to:

Draft