Copied to clipboard

Flag this post as spam?

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


  • David Peck 687 posts 1863 karma points c-trib
    Jul 09, 2010 @ 14:40
    David Peck
    0

    No write permissions, but a staging server

    We're installing Umbraco on a server, which is turns out we're not allowed write permissions for. I have a solution, but I wonder if someone knows if the following will work.

    The hosts have a staging environment, so I was planning on working on that and then asking them to copy up the files and data whenever we make changes. That seems all hunky-dorey, but the data is cached on to disk right?

    The latest version (4.5) has the following in the web.config, which sounds promising. If I enable this, will it prevent the need to write to the data folder?

        <!-- 
          Set this to true to enable storing the xml cache locally to the IIS server even if the app files are stored centrally on a SAN/NAS 
          Alex Norcliffe 2010 02 for 4.1
        -->
    <add key="umbracoContentXMLUseLocalTemp" value="false" />

    If not, can I stick the /data folder in a virtual directory on another server?

    All thoughts very welcome.

  • David Peck 687 posts 1863 karma points c-trib
    Jul 09, 2010 @ 14:43
    David Peck
    0

    BTW: I'd clean up the markup in the post but I'm seeing the following error when I try:

    Error parsing XSLT file: \xslt\forum-commentsList.xslt

  • David Peck 687 posts 1863 karma points c-trib
    Jul 16, 2010 @ 15:25
    David Peck
    0

    So does no-one knows what 'umbracoContentXMLUseLocalTemp', does then?

  • James Telfer 65 posts 165 karma points
    Nov 25, 2010 @ 03:56
    James Telfer
    0

    You've probably worked this out by now, but I've just been looking into the same thing, so I thought I'd share what I found.

    In umbraco.IO.SystemFiles.cs, the following code references the setting:

            public static string ContentCacheXml
            {
                get
                {
                    if (ContentCacheXmlIsEphemeral)
                    {
                        return Path.Combine(HttpRuntime.CodegenDir, @"UmbracoData\umbraco.config");
                    }
                    return IOHelper.returnPath("umbracoContentXML", "~/App_Data/umbraco.config");
                }
            }
    
            public static bool ContentCacheXmlIsEphemeral
            {
                get
                {
                    bool returnValue = false;
                    string configSetting = ConfigurationManager.AppSettings["umbracoContentXMLUseLocalTemp"];
    
                    if (!string.IsNullOrEmpty(configSetting))
                        if(bool.TryParse(configSetting, out returnValue))
                            return returnValue;
    
                    return false;
                }
            }
    
    This means that the umbraco.config file will be stored in the codegen dir, which _may_ be writeable by the application.
    According to a couple of references I found, though, this won't  work in medium trust. So, if your environment has full trust but no write access, then you're home free. If it's using medium trust though, you're out of luck. You may need to get your admin to enable write to the App_Data folder...
    Hope this helps,
    JT
Please Sign in or register to post replies

Write your reply to:

Draft