updated web.config settings and default settings.

This commit is contained in:
Shannon
2013-06-24 13:37:25 +10:00
parent ed1aee5047
commit 5af8e86e3b
7 changed files with 34 additions and 42 deletions

View File

@@ -116,13 +116,16 @@ namespace Umbraco.Core.Configuration
/// Gets the name of the content XML file.
/// </summary>
/// <value>The content XML.</value>
/// <remarks>
/// Defaults to ~/App_Data/umbraco.config
/// </remarks>
public static string ContentXmlFile
{
get
{
return ConfigurationManager.AppSettings.ContainsKey("umbracoContentXML")
? ConfigurationManager.AppSettings["umbracoContentXML"]
: string.Empty;
: "~/App_Data/umbraco.config";
}
}
@@ -136,7 +139,7 @@ namespace Umbraco.Core.Configuration
{
return ConfigurationManager.AppSettings.ContainsKey("umbracoStorageDirectory")
? ConfigurationManager.AppSettings["umbracoStorageDirectory"]
: string.Empty;
: "~/App_Data";
}
}
@@ -437,13 +440,24 @@ namespace Umbraco.Core.Configuration
/// Returns a string value to determine if umbraco should disbable xslt extensions
/// </summary>
/// <value><c>"true"</c> if version xslt extensions are disabled, otherwise, <c>"false"</c></value>
[Obsolete("This is no longer used and will be removed from the codebase in future releases")]
public static string DisableXsltExtensions
{
get
{
return ConfigurationManager.AppSettings.ContainsKey("umbracoDisableXsltExtensions")
? ConfigurationManager.AppSettings["umbracoDisableXsltExtensions"]
: string.Empty;
: "false";
}
}
internal static bool ContentCacheXmlStoredInCodeGen
{
get
{
//defaults to false
return ConfigurationManager.AppSettings.ContainsKey("umbracoContentXMLUseLocalTemp")
&& bool.Parse(ConfigurationManager.AppSettings["umbracoContentXMLUseLocalTemp"]); //default to false
}
}
@@ -451,14 +465,10 @@ namespace Umbraco.Core.Configuration
/// Returns a string value to determine if umbraco should use Xhtml editing mode in the wysiwyg editor
/// </summary>
/// <value><c>"true"</c> if Xhtml mode is enable, otherwise, <c>"false"</c></value>
[Obsolete("This is no longer used and will be removed from the codebase in future releases")]
public static string EditXhtmlMode
{
get
{
return ConfigurationManager.AppSettings.ContainsKey("umbracoEditXhtmlMode")
? ConfigurationManager.AppSettings["umbracoEditXhtmlMode"]
: string.Empty;
}
get { return "true"; }
}
/// <summary>
@@ -483,9 +493,10 @@ namespace Umbraco.Core.Configuration
{
get
{
//the default will be 'profiler'
return ConfigurationManager.AppSettings.ContainsKey("umbracoProfileUrl")
? ConfigurationManager.AppSettings["umbracoProfileUrl"]
: string.Empty;
: "profiler";
}
}

View File

@@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.IO
{
@@ -96,7 +97,7 @@ namespace Umbraco.Core.IO
{
get
{
if (ContentCacheXmlIsEphemeral && SystemUtilities.GetCurrentTrustLevel() == AspNetHostingPermissionLevel.Unrestricted)
if (GlobalSettings.ContentCacheXmlStoredInCodeGen && SystemUtilities.GetCurrentTrustLevel() == AspNetHostingPermissionLevel.Unrestricted)
{
return Path.Combine(HttpRuntime.CodegenDir, @"UmbracoData\umbraco.config");
}
@@ -104,19 +105,10 @@ namespace Umbraco.Core.IO
}
}
internal static bool ContentCacheXmlIsEphemeral
[Obsolete("Use GlobalSettings.ContentCacheXmlStoredInCodeGen instead")]
internal static bool ContentCacheXmlStoredInCodeGen
{
get
{
bool returnValue = false;
string configSetting = ConfigurationManager.AppSettings["umbracoContentXMLUseLocalTemp"];
if (!string.IsNullOrEmpty(configSetting))
if(bool.TryParse(configSetting, out returnValue))
return returnValue;
return false;
}
get { return GlobalSettings.ContentCacheXmlStoredInCodeGen; }
}
}
}

View File

@@ -8,18 +8,11 @@
<add key="umbracoConfigurationStatus" value="6.0.0"/>
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd"/>
<add key="umbracoReservedPaths" value="~/umbraco,~/install/"/>
<add key="umbracoContentXML" value="~/App_Data/umbraco.config"/>
<add key="umbracoStorageDirectory" value="~/App_Data"/>
<add key="umbracoPath" value="~/umbraco"/>
<add key="umbracoEnableStat" value="false"/>
<add key="umbracoHideTopLevelNodeFromPath" value="true"/>
<add key="umbracoEditXhtmlMode" value="true"/>
<add key="umbracoUseDirectoryUrls" value="false"/>
<add key="umbracoTimeOutInMinutes" value="20"/>
<add key="umbracoVersionCheckPeriod" value="7"/>
<add key="umbracoDisableXsltExtensions" value="true"/>
<add key="umbracoDefaultUILanguage" value="en"/>
<add key="umbracoProfileUrl" value="profiler"/>
<add key="umbracoUseSSL" value="false"/>
</appSettings>

View File

@@ -27,27 +27,21 @@
<BaseRestExtensions configSource="config\BaseRestExtensions.config" />
<appSettings>
<!--
Umbraco web.config configuration documentation can be found here:
http://our.umbraco.org/documentation/using-umbraco/config-files/#webconfig
-->
<add key="umbracoDbDSN" value="" />
<add key="umbracoConfigurationStatus" value="" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
<add key="umbracoStorageDirectory" value="~/App_Data" />
<add key="umbracoPath" value="~/umbraco" />
<add key="umbracoEnableStat" value="false" />
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
<add key="umbracoEditXhtmlMode" value="true" />
<add key="umbracoUseDirectoryUrls" value="false" />
<add key="umbracoTimeOutInMinutes" value="20" />
<add key="umbracoVersionCheckPeriod" value="7" />
<add key="umbracoDisableXsltExtensions" value="true" />
<add key="umbracoDefaultUILanguage" value="en" />
<add key="umbracoProfileUrl" value="profiler" />
<add key="umbracoUseSSL" value="false" />
<!-- 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"/>
<add key="webpages:Enabled" value="false"/>
<add key="enableSimpleMembership" value="false"/>
<add key="autoFormsAuthentication" value="false"/>

View File

@@ -1,6 +1,6 @@
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using umbraco;
using Umbraco.Core;
namespace Umbraco.Web.Routing

View File

@@ -224,6 +224,7 @@ namespace umbraco
/// Returns a string value to determine if umbraco should disbable xslt extensions
/// </summary>
/// <value><c>"true"</c> if version xslt extensions are disabled, otherwise, <c>"false"</c></value>
[Obsolete("This is no longer used and will be removed from the codebase in future releases")]
public static string DisableXsltExtensions
{
get { return Umbraco.Core.Configuration.GlobalSettings.DisableXsltExtensions; }
@@ -233,6 +234,7 @@ namespace umbraco
/// Returns a string value to determine if umbraco should use Xhtml editing mode in the wysiwyg editor
/// </summary>
/// <value><c>"true"</c> if Xhtml mode is enable, otherwise, <c>"false"</c></value>
[Obsolete("This is no longer used and will be removed from the codebase in future releases")]
public static string EditXhtmlMode
{
get { return Umbraco.Core.Configuration.GlobalSettings.EditXhtmlMode; }

View File

@@ -71,7 +71,7 @@ namespace umbraco.IO
public static bool ContentCacheXmlIsEphemeral
{
get { return Umbraco.Core.IO.SystemFiles.ContentCacheXmlIsEphemeral; }
get { return Umbraco.Core.IO.SystemFiles.ContentCacheXmlStoredInCodeGen; }
}
}
}