Merging into main 4.1.0 branch: Resolves a number of open issues, see associated WorkItems - Fix WP crash on invalid connection string due to generation of XML cache on a separate thread - Added option to generate xml cache file on local filesystem (in ASP.NET Temporary Files / CodeGenDir location) by adding <add key="umbracoContentXMLUseLocalTemp" value="true" /> to web.config file. This allows you to run from a SAN on a load-balanced environment whilst allowing each web node to have isolated copies of the xml cache file to avoid WP crashes due to multiple file locks - Others in WorkItems :) [TFS Changeset #64002]
106 lines
2.6 KiB
C#
106 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web;
|
|
|
|
namespace umbraco.IO
|
|
{
|
|
public class SystemFiles
|
|
{
|
|
|
|
public static string AccessXml
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Data + "/access.xml";
|
|
}
|
|
}
|
|
|
|
public static string CreateUiXml
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Umbraco + "/config/create/UI.xml";
|
|
}
|
|
}
|
|
|
|
public static string TinyMceConfig
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Config + "/tinyMceConfig.config";
|
|
}
|
|
}
|
|
|
|
public static string MetablogConfig
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Config + "/metablogConfig.config";
|
|
}
|
|
}
|
|
|
|
public static string DashboardConfig
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Config + "/dashboard.config";
|
|
}
|
|
}
|
|
|
|
public static string XsltextensionsConfig
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Config + "/xsltextensions.config";
|
|
}
|
|
}
|
|
|
|
public static string RestextensionsConfig
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Config + "/restextensions.config";
|
|
}
|
|
}
|
|
|
|
public static string NotFoundhandlersConfig
|
|
{
|
|
get
|
|
{
|
|
return SystemDirectories.Config + "/404handlers.config";
|
|
}
|
|
}
|
|
|
|
public static string ContentCacheXml
|
|
{
|
|
get
|
|
{
|
|
if (ContentCacheXmlIsEphemeral)
|
|
{
|
|
return Path.Combine(HttpRuntime.CodegenDir, @"UmbracoData\umbraco.config");
|
|
}
|
|
return IOHelper.returnPath("umbracoContentXML", "~/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;
|
|
}
|
|
}
|
|
}
|
|
}
|