From f219858098e5ad2fdea5f985707c0e7f64be6cff Mon Sep 17 00:00:00 2001 From: hartvig Date: Thu, 22 Jul 2010 21:49:37 +0000 Subject: [PATCH] Fixes 28234 [TFS Changeset #73592] --- umbraco/presentation/content.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/umbraco/presentation/content.cs b/umbraco/presentation/content.cs index 31901c973e..a5aa43f6d8 100644 --- a/umbraco/presentation/content.cs +++ b/umbraco/presentation/content.cs @@ -1053,9 +1053,11 @@ order by umbracoNode.level, umbracoNode.sortOrder"; * will check for this and call PersistXmlToFile() if necessary */ if (HttpContext.Current != null) { - if (!HttpContext.Current.Items.Contains(PersistenceFlagContextKey)) - HttpContext.Current.Items.Add(PersistenceFlagContextKey, null); - HttpContext.Current.Items[PersistenceFlagContextKey] = true; + HttpContext.Current.Application.Lock(); + if (HttpContext.Current.Application[PersistenceFlagContextKey] != null) + HttpContext.Current.Application.Add(PersistenceFlagContextKey, null); + HttpContext.Current.Application[PersistenceFlagContextKey] = true; + HttpContext.Current.Application.UnLock(); } else { @@ -1079,7 +1081,7 @@ order by umbracoNode.level, umbracoNode.sortOrder"; { get { - var val = HttpContext.Current.Items.Contains(PersistenceFlagContextKey); + var val = HttpContext.Current.Application[PersistenceFlagContextKey] != null; if (val != null) { return bool.Parse(val.ToString());