Sitefinity Field Migration

Background Story We have setup a content type with PostalCode in Number type.Number in layman term means 0 ~ 9, however it is different in coding / Sitefinity; it means a decimal type in database column which is not logical to start with 0. Therefore, when user create a new content, they could not enterContinue reading “Sitefinity Field Migration”

Sitefinity Custom 2FA Authentication

Idea in general: 1/ Create a new user in Sitefinity2/ User receive QR code and setup in Authenticator3/ User login with username & password -> Prompt for 2FA code4/ Login Successful! Sample Code: hawjeh/Sitefinity2fa (github.com) Steps: 1/ Go to /Sitefinity/Administration/ProfileTypes -> Basic ProfileAdd a custom field – AuthCode (ShortText) in user profile 2/ Create aContinue reading “Sitefinity Custom 2FA Authentication”

Sitefinity Integration with Azure AD / Open ID

Azure AD Setup 1/ Go to you Azure Active Directory → App Registrations → New Registration 2/ Give a name to the application, you can leave the Redirect URI as blank now. Then click Register. 3/ Go to Authentication Tab → Add a platform → Web 4/ Redirect URIs: http://<Sitefinity Instance>/Sitefinity/Authenticate/OpenID/signin-custom 5/ Select the tokensContinue reading “Sitefinity Integration with Azure AD / Open ID”

Sitefinity Content Security Policy Setting

There is an option to update CSP rule in backend dashboard setting from Sitefinity v11 onwards, under/Sitefinity/Administration/Settings/Basic/WebSecurityBasicSettings Please avoid remove the default CSP rule as it has high chance you will break Sitefinity frontend / backend unwillingly. Example front-end broken: Example back-end broken: How to fix it? Download this zip and amend the script (toContinue reading “Sitefinity Content Security Policy Setting”

Sitefinity – Investigate Schedule Task

Intro Scheduled tasks in Sitefinity CMS are objects that can execute a predefined set of operation at a particular point in time. You can use scheduled task… (read from reference..) Expected Workflow Schedule a task during application start Trigger ExecuteTask() Run ScheduleTask() Repeat 2-3 Schedule Task Code There are two important method, ExecuteTask() -> ItContinue reading “Sitefinity – Investigate Schedule Task”

Sitefinity – Best Practices When Implementing Custom MVC Widgets

In this sample, I have implemented IContentLocatableView IHasCacheDependency (SubscribeCacheDependency) HandleUnknownAction ContentBaseController and ContentModelBase  It has the main functionality for constructing all the out-of-the-box SEO properties, supporting listing and detail pages. When this class is implemented, you will be able to call the InitializeMetadataDetailsViewBag method, pass in it the item that is currently being displayed and based on theContinue reading “Sitefinity – Best Practices When Implementing Custom MVC Widgets”

My TFS CICD setup for Sitefinity Project – Part 3

Link to Part 2 Important Notes Planning before execution Clearly understand each command / argument Must confirm input path are correct (no turn back if CD server erase all files) Strategy 1. Developer push code to TFS and it will send signal to CI server if it is a watching branch (in our case theContinue reading “My TFS CICD setup for Sitefinity Project – Part 3”

My TFS CICD setup for Sitefinity Project – Part 2

Link to Part 1 Important Notes Planning before execution Clearly understand each command / argument Must confirm input path are correct (no turn back if CD server erase all files) Strategy 1. Developer push code to TFS and it will send signal to CI server if it is a watching branch (in our case theContinue reading “My TFS CICD setup for Sitefinity Project – Part 2”