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.
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).
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?
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.
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
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?
is working on a reply...