Skip to content

Instantly share code, notes, and snippets.

@khurramkhang
khurramkhang / EpiFormextension
Created Dec 11, 2018
Get Specific Epi Server Form Elements
View EpiFormextension
using EPiServer.Core;
using EPiServer.Forms.Core;
using EPiServer.Forms.Core.Models;
using EPiServer.Forms.Helpers.Internal;
using EPiServer.Forms.Implementation.Elements;
using System.Collections.Generic;
using System.Linq;
namespace PixieDigital.EpiServer.Extensions
{
View SpecialCharactersInUrlModule.cs
//Tested in EPiServer CMS 11
using System;
using System.Configuration;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;
using EPiServer.Web;
namespace Alloy.Business
{
@khurramkhang
khurramkhang / MigrateToAsp.NetIdentity
Last active Mar 23, 2021
Migrate Users to ASP.Net Identity
View MigrateToAsp.NetIdentity
select * from [dbo].[Users]
INSERT INTO AspNetUsers(Id,
UserName,
Email,
PasswordHash,
SecurityStamp,
EmailConfirmed,
PhoneNumber,
PhoneNumberConfirmed,
View ApplicationBuilderExtensions.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using EPiServer.Cms.UI.AspNetIdentity;
using EPiServer.Shell.Security;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin;
@khurramkhang
khurramkhang / SqlPasswordHasher.cs
Last active Oct 31, 2017
Migrate to ASP.Net Identity
View SqlPasswordHasher.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using Microsoft.AspNet.Identity;
namespace MySite.Business.Identity
{
public class SqlPasswordHasher : PasswordHasher
@khurramkhang
khurramkhang / ISerializeContents.cs
Created Jul 20, 2017
Serialize EPiServer IContent
View ISerializeContents.cs
using System.Dynamic;
using EPiServer.Core;
namespace PixieDigital.EpiServer.Extensions.Contents
{
public interface ISerializeContents
{
ExpandoObject SerializeableContent(IContent content);
ExpandoObject SerializeableContent(ContentReference contentReference);
}
View ContainsCookieKpi.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.Serialization;
using System.Text;
using System.Web;
using System.Web.Mvc;
using EPiServer;
View CustomPriceService.cs
using System;
using System.Collections.Generic;
using System.Linq;
using CommerceExtensions.Order;
using Mediachase.Commerce;
using Mediachase.Commerce.Catalog;
using Mediachase.Commerce.Pricing;
namespace CommerceExtensions.Pricing
{
@khurramkhang
khurramkhang / CustomPlacedPriceProcessor.cs
Created Dec 21, 2016
Custom Placed Price Price Processor
View CustomPlacedPriceProcessor.cs
using System;
using System.Collections.Generic;
using System.Linq;
using EPiServer;
using EPiServer.Commerce.Catalog.ContentTypes;
using EPiServer.Commerce.Order;
using Mediachase.Commerce;
using Mediachase.Commerce.Customers;
using Mediachase.Commerce.Catalog;
using Mediachase.Commerce.Pricing;
@khurramkhang
khurramkhang / AddonValidation.cs
Created Dec 21, 2016
Custom Line Item Validator
View AddonValidation.cs
using System;
using System.Linq;
using EPiServer;
using EPiServer.Commerce.Catalog.ContentTypes;
using EPiServer.Commerce.Order;
using EPiServer.Commerce.Validation;
using Mediachase.Commerce;
using Mediachase.Commerce.Catalog;
using Mediachase.Commerce.Catalog.Dto;