DO NOT DOWNLOAD, THERE ARE MUCH MORE IMPORTANT THINGS GOING ON TODAY THAN LOOKING AT THIS SOURCE CODE!

Modifying the LINQ to Umbraco node data provider to work with the new schema
Adding some additional properties to the DocTypeBase class and IDocTypeBase interface

[TFS Changeset #64007]
This commit is contained in:
slace
2010-02-16 05:55:21 +00:00
parent bbf1a05681
commit ea6b8f61fe
9 changed files with 61 additions and 316 deletions

View File

@@ -313,6 +313,8 @@ namespace umbraco.Linq.Core
}
}
public virtual string CreatorName { get; internal set; }
/// <summary>
/// ID of the user who last edited the item
/// </summary>
@@ -344,6 +346,8 @@ namespace umbraco.Linq.Core
}
}
public virtual string WriterName { get; internal set; }
/// <summary>
/// Raises the property changing event.
/// </summary>

View File

@@ -36,6 +36,11 @@ namespace umbraco.Linq.Core
/// <value>The creator ID.</value>
int CreatorID { get; }
/// <summary>
/// Gets the name of the creator.
/// </summary>
/// <value>The name of the creator.</value>
string CreatorName { get; }
/// <summary>
/// Gets the id of the item.
/// </summary>
/// <value>The id.</value>
@@ -67,14 +72,6 @@ namespace umbraco.Linq.Core
/// <value>The parent node id.</value>
int ParentNodeId { get; set; }
/// <summary>
/// Occurs when a property value changes.
/// </summary>
event PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// Occurs when a property value is changing.
/// </summary>
event PropertyChangingEventHandler PropertyChanging;
/// <summary>
/// Gets or sets the sort order.
/// </summary>
/// <value>The sort order.</value>
@@ -99,5 +96,10 @@ namespace umbraco.Linq.Core
/// </summary>
/// <value>The writer ID.</value>
int WriterID { get; }
/// <summary>
/// Gets the name of the writer.
/// </summary>
/// <value>The name of the writer.</value>
string WriterName { get; }
}
}

View File

@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace umbraco.Linq.Core.Node
{
@@ -60,7 +58,7 @@ namespace umbraco.Linq.Core.Node
var rawNodes = parents
.Single()
.Elements()
.Where(x => x.HasAttributes)
.Where(x => x.Attribute("isDoc") != null)
;
this._nodes = provider.DynamicNodeCreation(rawNodes).Cast<TDocTypeBase>(); //drop is back to the type which was asked for
}
@@ -86,6 +84,9 @@ namespace umbraco.Linq.Core.Node
/// <value>The provider.</value>
public override UmbracoDataProvider Provider { get; protected set; }
/// <summary>
/// Reloads the cache.
/// </summary>
public override void ReloadCache()
{
this.LoadNodes();

View File

@@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.IO;
using System.Xml.Linq;
using System.Xml.Schema;
using System.Xml;
using System.Reflection;
using umbraco.presentation;
using umbraco.cms.helpers;
@@ -18,19 +14,16 @@ namespace umbraco.Linq.Core.Node
/// Data Provider for LINQ to umbraco via umbraco ndoes
/// </summary>
/// <remarks>
/// This class provides a data access model for the umbraco XML cache.
/// It is responsible for the access to the XML and construction of nodes from it.
///
/// The <see cref="umbraco.Linq.Core.Node.NodeDataProvider"/> is capable of reading the XML cache from either the path provided in the umbraco settings or from a specified location on the file system.
/// <para>This class provides a data access model for the umbraco XML cache.
/// It is responsible for the access to the XML and construction of nodes from it.</para>
/// <para>The <see cref="umbraco.Linq.Core.Node.NodeDataProvider"/> is capable of reading the XML cache from either the path provided in the umbraco settings or from a specified location on the file system.</para>
/// </remarks>
public sealed class NodeDataProvider : UmbracoDataProvider
{
private object lockObject = new object();
private string _xmlPath;
private Dictionary<UmbracoInfoAttribute, IContentTree> _trees;
private bool _enforceSchemaValidation;
private XDocument _xml;
private const string UMBRACO_XSD_PATH = "umbraco.Linq.Core.Node.UmbracoConfig.xsd";
private Dictionary<string, Type> _knownTypes;
private bool _tryMemoryCache = false;
@@ -43,10 +36,10 @@ namespace umbraco.Linq.Core.Node
{
if (this._tryMemoryCache)
{
var doc = content.Instance.XmlContent;
var doc = UmbracoContext.Current.Server.ContentXml;
if (doc != null)
{
this._xml = XDocument.Load(new XmlNodeReader(doc));
this._xml = doc;
}
else
{
@@ -57,55 +50,29 @@ namespace umbraco.Linq.Core.Node
{
this._xml = XDocument.Load(this._xmlPath);
}
if (this._enforceSchemaValidation)
{
XmlSchemaSet schemas = new XmlSchemaSet();
//read the resorce for the XSD to validate against
schemas.Add("", System.Xml.XmlReader.Create(this.GetType().Assembly.GetManifestResourceStream(UMBRACO_XSD_PATH)));
//we'll have a list of all validation exceptions to put them to the screen
List<XmlSchemaException> exList = new List<XmlSchemaException>();
//some funky in-line event handler. Lambda loving goodness ;)
this._xml.Validate(schemas, (o, e) => { exList.Add(e.Exception); });
if (exList.Count > 0)
{
//dump out the exception list
StringBuilder sb = new StringBuilder();
sb.AppendLine("The following validation errors occuring with the XML:");
foreach (var item in exList)
{
sb.AppendLine(" * " + item.Message + " - " + item.StackTrace);
}
throw new XmlSchemaException(sb.ToString());
}
}
}
return this._xml; //cache the XML in memory to increase performance and force the disposable pattern
}
}
private void Init(string xmlPath, bool legacySchema)
/// <summary>
/// Initializes the NodeDataProvider, performing validation
/// </summary>
/// <param name="xmlPath">The XML path.</param>
/// <param name="newSchemaMode">if set to <c>true</c> [new schema mode].</param>
protected void Init(string xmlPath, bool newSchemaMode)
{
if (legacySchema)
{
throw new NotSupportedException("The NodeDataProvider does not support the old XML schema mode. Set \"UseLegacyXmlSchema\" in your umbracoSettings.Config to \"true\" and republish the site");
}
if (!newSchemaMode)
throw new NotSupportedException(this.Name + " only supports the new XML schema. Change the umbracoSettings.config to implement this and republish");
if (string.IsNullOrEmpty(xmlPath))
{
throw new ArgumentNullException("xmlPath");
}
if (!File.Exists(xmlPath))
{
throw new FileNotFoundException("The XML used by the provider must exist", xmlPath);
}
this._xmlPath = xmlPath;
this._xmlPath = xmlPath;
this._trees = new Dictionary<UmbracoInfoAttribute, IContentTree>();
}
@@ -113,7 +80,7 @@ namespace umbraco.Linq.Core.Node
/// Initializes a new instance of the <see cref="NodeDataProvider"/> class using umbraco settings as XML path
/// </summary>
public NodeDataProvider()
: this(UmbracoContext.Current.Server.MapPath(UmbracoContext.Current.Server.ContentXmlPath), !UmbracoContext.Current.NewSchemaMode)
: this(UmbracoContext.Current.Server.MapPath(UmbracoContext.Current.Server.ContentXmlPath), UmbracoContext.Current.NewSchemaMode)
{
this._tryMemoryCache = true;
}
@@ -122,27 +89,13 @@ namespace umbraco.Linq.Core.Node
/// Initializes a new instance of the <see cref="NodeDataProvider"/> class
/// </summary>
/// <param name="xmlPath">The path of the umbraco XML</param>
/// <param name="legacySchema">if set to <c>true</c> [legacy schema].</param>
/// <param name="newSchemaMode">Indicates which Schema mode is used for the XML file</param>
/// <remarks>
/// This constructor is ideal for unit testing as it allows for the XML to be located anywhere
/// </remarks>
public NodeDataProvider(string xmlPath, bool legacySchema)
: this(xmlPath, legacySchema, false)
public NodeDataProvider(string xmlPath, bool newSchemaMode)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="NodeDataProvider"/> class.
/// </summary>
/// <param name="xmlPath">The XML path.</param>
/// <param name="legacySchema">if set to <c>true</c> [legacy schema].</param>
/// <param name="enforceValidation">if set to <c>true</c> when the XML document is accessed validation against the umbraco XSD will be done.</param>
/// <exception cref="System.ArgumentNullException">Thrown when the xmlPath is null</exception>
/// <exception cref="System.IO.FileNotFoundException">Thrown when the xmlPath does not resolve to a physical file</exception>
public NodeDataProvider(string xmlPath, bool legacySchema, bool enforceValidation)
{
this.Init(xmlPath, legacySchema);
this._enforceSchemaValidation = enforceValidation;
this.Init(xmlPath, newSchemaMode);
}
#region IDisposable Members
@@ -198,9 +151,7 @@ namespace umbraco.Linq.Core.Node
var attr = ReflectionAssistance.GetUmbracoInfoAttribute(typeof(TDocType));
if (!this._trees.ContainsKey(attr))
{
SetupNodeTree<TDocType>(attr);
}
return (NodeTree<TDocType>)this._trees[attr];
}
@@ -237,14 +188,10 @@ namespace umbraco.Linq.Core.Node
var parentXml = this.Xml.Descendants().SingleOrDefault(d => (int)d.Attribute("id") == id);
if (!ReflectionAssistance.CompareByAlias(typeof(TDocType), parentXml))
{
throw new DocTypeMissMatchException(parentXml.Name.LocalName, ReflectionAssistance.GetUmbracoInfoAttribute(typeof(TDocType)).Alias);
}
if (parentXml == null) //really shouldn't happen!
{
throw new ArgumentException("Parent ID \"" + id + "\" cannot be found in the loaded XML. Ensure that the umbracoDataContext is being disposed of once it is no longer needed");
}
var parent = new TDocType();
this.LoadFromXml(parentXml, parent);
@@ -337,10 +284,9 @@ namespace umbraco.Linq.Core.Node
{
return ((UmbracoInfoAttribute)k.GetCustomAttributes(typeof(UmbracoInfoAttribute), true)[0]).Alias;
});
foreach (var type in types)
{
this._knownTypes.Add(Casing.SafeAlias(type.Key), type.Value);
}
}
@@ -380,7 +326,9 @@ namespace umbraco.Linq.Core.Node
node.SortOrder = (int)xml.Attribute("sortOrder");
node.UpdateDate = (DateTime)xml.Attribute("updateDate");
node.CreatorID = (int)xml.Attribute("creatorID");
node.CreatorName = (string)xml.Attribute("creatorName");
node.WriterID = (int)xml.Attribute("writerID");
node.WriterName = (string)xml.Attribute("writerName");
node.Level = (int)xml.Attribute("level");
node.TemplateId = (int)xml.Attribute("template");
@@ -391,9 +339,8 @@ namespace umbraco.Linq.Core.Node
var data = xml.Element(Casing.SafeAlias(attr.Alias)).Value;
if (p.PropertyType == typeof(int) && string.IsNullOrEmpty(data))
{
data = "-1";
}
// TODO: Address how Convert.ChangeType works in globalisation
p.SetValue(node, Convert.ChangeType(data, p.PropertyType), null);
}

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace umbraco.Linq.Core.Node

View File

@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Xml.Linq;
namespace umbraco.Linq.Core
{
@@ -12,7 +7,7 @@ namespace umbraco.Linq.Core
/// Represents a collection within DataProvider of a DocType
/// </summary>
/// <remarks>
/// Similar to the implementation of <see cref="System.Data.Linq.Table&lt;T&gt;"/>,
/// Similar to the implementation of <see cref="System.Data.Linq.Table&lt;TEntity&gt;"/>,
/// providing a single collection which represents all instances of the given type within the DataProvider.
///
/// Implementers of this type will need to provide a manner of retrieving the TDocType from the DataProvider
@@ -69,9 +64,25 @@ namespace umbraco.Linq.Core
#endregion
/// <summary>
/// Insert an item on submit of the DataContext
/// </summary>
/// <param name="item">The item.</param>
public abstract void InsertOnSubmit(TDocType item);
/// <summary>
/// Insert a collection of items on submit of the DataContext
/// </summary>
/// <param name="items">The items.</param>
public abstract void InsertAllOnSubmit(IEnumerable<TDocType> items);
/// <summary>
/// Deletes an item on submit of the DataContext
/// </summary>
/// <param name="itemm">The itemm.</param>
public abstract void DeleteOnSubmit(TDocType itemm);
/// <summary>
/// Deletes a collection of items on submit of the DataContext
/// </summary>
/// <param name="items">The items.</param>
public abstract void DeleteAllOnSubmit(IEnumerable<TDocType> items);
}
}

View File

@@ -53,6 +53,9 @@
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Runtime.Serialization">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
@@ -90,9 +93,6 @@
<Compile Include="Switch.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\..\dep\Schemas\UmbracoConfig.xsd">
<Link>Node\UmbracoConfig.xsd</Link>
</EmbeddedResource>
<None Include="CoreClasses.cd" />
</ItemGroup>
<ItemGroup>

View File

@@ -48,7 +48,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{05329D
config templates\config\404handlers.config = config templates\config\404handlers.config
config templates\config\Dashboard.config = config templates\config\Dashboard.config
umbraco\presentation\config\ExamineIndex.config = umbraco\presentation\config\ExamineIndex.config
umbraco\presentation\config\ExamineSettings.config = umbraco\presentation\config\ExamineSettings.config
config templates\config\formHandlers.config = config templates\config\formHandlers.config
config templates\config\metablogConfig.config = config templates\config\metablogConfig.config
config templates\config\restExtensions.config = config templates\config\restExtensions.config

View File

@@ -1,218 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
<!-- ASPNETAJAX -->
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="umbraco.presentation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
<section name="clientDependency" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core" />
<section name="UmbracoExamine" type="UmbracoExamine.Core.Config.UmbracoExamineSettings, UmbracoExamine.Core" />
<section name="ExamineLuceneIndexSets" type="UmbracoExamine.Providers.Config.ExamineLuceneIndexes, UmbracoExamine.Providers" />
</configSections>
<urlrewritingnet configSource="config\UrlRewriting.config" />
<microsoft.scripting configSource="config\scripting.config" />
<clientDependency configSource="config\ClientDependency.config" />
<UmbracoExamine configSource="config\ExamineSettings.config" />
<ExamineLuceneIndexSets configSource="config\ExamineIndex.config" />
<appSettings>
<add key="umbracoDbDSN" value="Data Source=.\SQLEXPRESS;Initial Catalog=BB_Umbraco_Sandbox1;integrated security=false;user id=umbraco;pwd=umbraco" />
<add key="umbracoConfigurationStatus" value="4.1.0.beta" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/data/umbraco.config" />
<add key="umbracoStorageDirectory" value="~/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="umbracoDebugMode" value="true" />
<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" />
<add key="umbracoUseMediumTrust" value="false" />
<add key="umbracoContentXMLUseLocalTemp" value="false" />
<!-- Set to true to write this to the local CodeGenDir instead, in SAN / NAS situations -->
</appSettings>
<system.net>
<mailSettings>
<smtp>
<network host="127.0.0.1" userName="username" password="password" />
</smtp>
</mailSettings>
</system.net>
<!-- REMOVE FOR BETA -->
<!-- added by NH to test foreign membership providers-->
<connectionStrings>
<remove name="LocalSqlServer" />
<!--<add name="LocalSqlServer" connectionString="server=.\sqlexpress;database=aspnetdb;user id=DBUSER;password=DBPASSWORD" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<system.web>
<!-- <trust level="Medium" originUrl=".*" />-->
<customErrors mode="Off" />
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
<xhtmlConformance mode="Strict" />
<pages enableEventValidation="false">
<!-- ASPNETAJAX -->
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</controls>
</pages>
<httpModules>
<!-- URL REWRTIER -->
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
<!-- UMBRACO -->
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
<!-- ASPNETAJAX -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
<httpHandlers>
<remove verb="*" path="*.asmx" />
<!-- ASPNETAJAX -->
<add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<add verb="*" path="*_AppService.axd" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<!-- UMBRACO CHANNELS -->
<add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
<add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
<add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
</httpHandlers>
<compilation defaultLanguage="c#" debug="true" batch="false">
<assemblies>
<!-- ASPNETAJAX -->
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />
</authentication>
<authorization>
<allow users="?" />
</authorization>
<!-- Membership Provider -->
<membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
<add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
</providers>
</membership>
<!-- added by NH to support membership providers in access layer -->
<roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
<providers>
<clear />
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
</providers>
</roleManager>
<!-- Sitemap provider-->
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
<providers>
<clear />
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
</providers>
</siteMap>
</system.web>
<!-- ASPNETAJAX -->
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>
<applicationSettings>
<umbraco.presentation.Properties.Settings>
<setting name="umbraco_com_regexlib_Webservices" serializeAs="String">
<value>http://regexlib.com/WebServices.asmx</value>
</setting>
</umbraco.presentation.Properties.Settings>
</applicationSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers accessPolicy="Read, Write, Script, Execute">
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" name="Channels" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
<add verb="*" name="Channels_Word" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
<add verb="*" name="ClientDependency" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
<add verb="GET,HEAD,POST" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
</handlers>
</system.webServer>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="WarnAsError" value="false" />
</compiler>
</compilers>
</system.codedom>
<!--
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
-->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>