This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Specialized; | |
using System.Configuration; | |
using System.Data; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Web.Security; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Extends the standard WFM data provider to use a regular .NET connection string name instead of a bare connection string (such that we can store all connection strings in one file) | |
/// </summary> | |
public class SqlServerWfmDataProvider : WFMDataProvider | |
{ | |
public SqlServerWfmDataProvider(string connectionStringName) : base(ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<formsDataProvider type="My.Namespace.SqlServerWfmDataProvider, My.Assembly"> | |
<param desc="connection string name">forms</param> | |
</formsDataProvider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Isite.Sitecore.UI.WebControls; | |
using Isite.Extensions; | |
using System.Web.UI; | |
using System.Threading.Tasks; | |
using Sitecore.Data.Items; | |
using System.Collections.Generic; | |
using System.Threading; | |
using Sitecore.Caching; | |
using System.Diagnostics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<serialization> | |
<default> | |
<include database="master" path="/sitecore/templates"/> | |
<include database="core" path="/sitecore"> | |
<exclude path="/sitecore/content/Home" /> | |
</include> | |
</default> | |
<templates> | |
<include database="master" path="/sitecore/templates"/> | |
</templates> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Web.Http; | |
namespace Foo.Web.Sites.ExampleSite.Shared.Data | |
{ | |
// for more on Attribute Routing (used in this sample to create routes), see http://blogs.msdn.com/b/webdev/archive/2013/10/17/attribute-routing-in-asp-net-mvc-5.aspx | |
// the RoutePrefix is the base path to the API controller | |
[RoutePrefix("ExampleSite/api/Sample")] | |
// this defines how to perform default route lookups on methods (e.g. this routes the action to a method of the same name like asp.net MVC, and sets Get() to the default action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Net.Http.Formatting; | |
using System.Web.Http; | |
using Foo.Web; | |
// automatically exectute this class' Start() method right after Application_Start (without needing to change global.asax) | |
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(WebApiConfig), "Start")] | |
namespace Foo.Web | |
{ | |
public static class WebApiConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using Blade.Utility; | |
using Sitecore; | |
using Sitecore.ContentSearch; | |
using Sitecore.ContentSearch.ComputedFields; | |
using Sitecore.Data.Fields; | |
using Sitecore.Data.Items; | |
using Sitecore.Layouts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<contentSearch> | |
<indexConfigurations> | |
<defaultLuceneIndexConfiguration> | |
<fields hint="raw:AddComputedIndexField"> | |
<!-- indexes subcontent contents into parent's _content field in the index (for better site search) --> | |
<field fieldName="_content" type="Foo.ContentSearch.ComputedFields.SubcontentField, Foo" /> | |
</fields> | |
</defaultLuceneIndexConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Configuration; | |
using System.Web; | |
using System.Web.Configuration; | |
using Foo.Web; | |
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(AutoEncryptConnectionStrings), "AutoEncrypt")] | |
namespace Foo.Web | |
{ | |
public class AutoEncryptConnectionStrings |
OlderNewer