Top benefits of Dependency injection
What is Dependency injection? Dependency injection is a software design pattern that separates the construction of a dependency from its usage. This means that you can focus on writing your code without worrying about how to instantiate each object, and the dependencies will be injected at runtime. The dependency injection pattern was introduced in the…
How to enable dynamic GZIP compression on Azure Web App
Go to the Kudu on Azure First should go to Kudu on Azure. Please visit https://docs.microsoft.com/en-us/azure/app-service/resources-kudu to get more insights. You can just add “scm” to your azure web app URL as follows. Find CMD console Then, you should navigate to the CMD console: Find the application Config folder Click on the “Site root” icon…
Best keyboard shortcuts for .NET development
A keyboard is an essential tool for programmers, whether coding or just typing away. Some keystrokes can save time using your computer and make it easier to get things done. A shortcut might seem like a simple combination of two or more buttons pressed at the same time, but there’s actually tons of power behind…
How to control content fields and tabs visibility in Umbraco CMS
Hiding properties and tabs in Umbraco CMS This post illustrates the idea of how you can control and restrict the visibility of content (node) parts, such as fields and properties for Umbraco back-office users (based on the role).While Umbraco allows you to restrict the whole node to specific user groups, sometimes, this may not be…
Deploying ASP .NET app to FTP with Azure DevOps CI/CD pipeline
What you will learn In this post, I will show how to configure the Azure DevOps pipeline – to easily publish an ASP .NET app to FTP server. How to configure the pipeline (5 easy steps) FtpUpload task is essential, please check the last step. To deploy all your files to the desired FTP location,…
Working with Media files in Umbraco – Boss Mode
Recently, together with Wojciech Tengler, we released a new package for Umbraco CMS called Dedicated Media Folder. The package is a must-have for every Umbraco-based website and enables working with files easily. We decided to prepare a short showcase presenting the full power of the package.
How to manage Personal Access Tokens with Azure DevOps panel
Managing personal access tokens (PATs) can be difficult and time-consuming because they are long strings of characters that are hard to memorize or keep track of. It’s easy to lose your PAT, which means you’ll need to create a new one – this process is tedious and takes up valuable time. Azure DevOps has made…
Umbraco’s best packages (free and paid)
Packages are like spices, Umbraco is your meal. Plugins give Umbraco additional functionality, the ability to do more things faster and better way. They extend the possibilities Umbraco has by default and can be a great benefit for every Umbraco-based website. Umbraco CMS does not have so many packages like WordPress but continues to have…
Essential productivity tips and techniques you should know (Updated)
Time is the most valuable resource that we have on this planet and you are the only person who is in charge of this precious asset. In this blog post, we will explore productivity tips and methods to prioritize tasks, manage time effectively to help you make life easier and happier. Essential tips to make…
How to use Sort option to organize Umbraco CMS Content
Sorting content in the Umbraco back office tree seems like an obvious function. However, several times, I have found out that people who start working with Umbraco are not aware of this feature. The well-organized & sorted content has several advantages: Editors can easily arrange the order of any elements by themselves. The back office…
Getting domains list for node programmatically in Umbraco CMS
Once you define hostnames for a Content node in Umbraco CMS in the back office – it’s easy to get the list in C# within a few lines of code. To do so you should use the IDomainService and grab the instance. You can get service instance using static service locator as follows: The IDomainService has a very easy-to-use…
How to add roles to members programmatically in Umbraco CMS
Let say we have a member with email umbraco-member@piotrbach.com The system has two member groups named: “Customers” and “Partners” To add a member to both roles you can use a handy method called ‘AddUserToRoles’ available in ‘System.Web.Security’ namespace: You need to specify the user name and desired membership groups (roles) array and that’s it. Once you…
Finding Azure App Service FTP Credentials
Where to get FTP Credentials to Azure App in Azure Portal? To find FTP user/password Credentials to easy access Azure App Service you should follow the steps: Log in to Azure Portal. Find App service. Navigate to Deployment Center. Switch to FTPS credentials Tab. Go to the Application scope section, you will find username/password inputs….
How to reset forgotten password in Umbraco CMS
Resetting User password in Umbraco via email You’ve lost your user password and can’t log in to Umbraco back-office? If so, go through the above steps to log in and use Umbraco again. Step 1: Navigate to Umbraco welcome page First, you need to navigate to Umbraco welcome panel and click the “Forgotten password” link….
Setting Umbraco to work with Azure private storage
Umbraco media and Azure private blob storage insights Setting up Umbraco to work with Azure blobs is quite easy with UmbracoFileSystemProviders.Azure package when the blob storage has default settings and “Allow blob public access” is enabled. However, if you want to follow MS security recommendations and store media files on private blob storage – things get a…
Resolving Umbraco Examine cannot index queue items error
Introduction Recently, while working with Umbraco 8.6.0 deployed on Azure I encountered an Examine error: Cannot index queue items, the index is currently lockedUmbraco.Examine.UmbracoContentIndex This is a nasty error that can cause a few problems like: Crashing the whole app for visitors Causing all kinds of back-office errors (searching, editing, examine panel overview) Making editors’…
How to disable ReSharper in Visual Studio š
To disable ReSharper in Visual Studio you should take the following steps: Go to the Top menu. Expand the Tools Tab and find “Options” š ļø. Click “Options” and a new window should appear. Find Resharper Section (you can use the search input to filter the results) and go to “General”. Click the “Suspend Now” button….
Creating Umbraco custom helper in AngularJS
Introduction The entire Umbraco back-office panel is built around AngularJS which allows for easy extension and modification of basic functionalities. For the work to be effective, you should use a ready set of filters, services, and directives that allow you to speed up the development time. See Umbraco 8 Backoffice UI API Documentation to discover the full…
After Hours: Lennox Lewis vs Vitali KlitschkoāHIGHLIGHTS 2020ā
The fight between Lennox Lewis and Vitali Klitschko took place on June 21, 2003, at the Staples Center in Los Angeles, California. This great fight was called “Battle of the Titans” and even after many years, it is still electrifying. The fight ended with a controversial victory for Lennox, who did not give Vitali a…
How to rebuild all indexes in MS SQL server database
In this post, I am gonna share a complete SQL snippet allowing to rebuild all indexes in the MS SQL server database quickly. You can use this complete SQL code directly in SQL Server Management Studio or your tool of choice. Rebuilding the indexes can heal index fragmentation and make a key difference when it comes to performance and database maintenance. Why…
Great Resources to Learn How to Use Umbraco Like a Pro [2022]
Do you want to work with Umbraco efficiently? Great! I found people getting confused trying to find relevant resources to start working with Umbraco CMS. For this reason, I have gathered the best links and resources so you could get better insights into Umbraco and start working like a PRO. Let’s jump in. Umbraco official resources Umbraco…
How to send form with attachment to DIXA in C#
What you will learn In this post, I am gonna share a piece of code allowing to send a message to the DIXA webform endpoint via C# programmatically. Before we go further, please make sure you’ve read the official documentation here: https://support.dixa.help/en/articles/175 You will find there some useful resources on how to: Set up a web form endpoint. Open a conversation thread using…
How to delete a large number of records from MSSQL table
How to delete records from the MSSQL table page by page? In this short post, I am gonna share a quick SQL snippet allowing us to remove a lot of records from the MSQL table. Contrary to appearances, deleting a large amount of data from a SQL table may not be a simple task. It is good practice to avoid long-running…
Workaround: fixing Umbraco template not found error
How to fix Umbraco Template not found custom 404 error? In this post, I am gonna share a quick workaround on how you can resolve the Umbraco CMS Template not found error for published content. Recently I had a strange issue while trying to render a view for document type (product). For some reason, the Umbraco engine could not…
How to get translation in Umbraco by dictionary key
This article will demonstrate how to get translation in Umbraco Cms using LocalizationService for a given dictionary key. Defining translations in the Backoffice At this stage, we need some data to work. Login to the Umbraco Backoffice panel. Go to the Translation section. Find the Dictionary section (left panel). Create a dictionary item called “Forms.ContactForm.ThankYouMessage”….
Reset the identity column value in MSSQL
How to reset the identity column value in the SQL server? To reset the current identity value for the table you should use DBCC CHECKIDENT function. It’s a great way to control the numbers sequence for the identity column. DBCC CHECKIDENT function is very useful for database maintenance and can be applied to numeric types: smallint bigint tinyint numeric integer decimal Why should use…
How to set Umbraco CMS DateTime Picker programmatically in AngularJs
Introduction In this short article, I am going to show the steps needed toĀ set up date-time control programmatically in the UmbracoĀ CMSĀ back office. Recently, I had to refresh the date time picker control value under certain business-logic conditions directly in the angularJs controller. I had some issues, so I decided to write this text and share my working code….
3 easy steps to enable WebP image format in Umbraco CMS
How to serve Umbraco images in WebP format? Itās really simple with the WebP plugin (https://imageprocessor.org/imageprocessor/plugins/webp/) – an awesome extension to the ImageProcessor package. With the WebP package and simple setup, it’s possible to expose Umbraco’s images in Googleās WebP format. By the end of this article, you will know what exact steps you need to take to enable…
How to Delete Umbraco User Permanently
Disabling vs deleting Umbraco users As you may have already noticed, the Umbraco back-office panel does not have a built-in user removal option. When you log in and visit the Users section you will see, that you can only deactivate a user. I must mention here, that it’s possible to easily hide these inactive users,…
Enabling cross-origin requests in Umbraco API and Azure
What you will learn In this article, Iāll show how you can resolve Umbraco CMS API CORS policy problems, so you could easily consume Umbraco API from another domain. By the end of this short tutorial, you will know what steps you need to take to: Configure CORS for Umbraco API Fix Umbraco API CORS…
How to handle scripts bundling and minification in Umbraco CMS
Introduction There are many ways to make your Umbraco website load faster. In this article, I’ll cover the bundling and minification technique in Umbraco using native Microsoft.AspNet.Web.Optimization library to show how to optimize scripts. Before we start make sure you’ve read my previous post on – How to handle bundling and minification in ASP .NET. You should follow…
Logging Umbraco Api errors with a custom action filter
How to log exceptions in Umbraco Api Controller? In this short article, I am going to present a simple technique for logging exceptions in UmbracoApi with ActionFilters. There are many ways to handle exceptions in Umbraco CMS, however, logging using filters has quite a benefits: Short implementation time Can be applied globally or only on individual…
How to detect slow responses in Umbraco API?
Introduction In this short article, I am going to present a simple technique for detecting every slow response in Umbraco API with ActionFilters. It can be very useful when you need to: Find slow responses from the Umbraco API. Apply an efficient micro-benchmark technique without fireworks for use in a short time. Locate Umbraco CMS performance bottlenecks. Fix integration issues. Concept outline The principle of the…
Ultimate Power tools for .NET Developers [2022]
Introduction Hi Readers! In this article, I want to share with you some hand-picked powerful tools to make development work more effective. I use most of them all the time on a daily basis. In the following article, I will just focus on the basic overview, because some tools are very complex and the list of features changes…
How to use bundling and minification in ASP .NET
What you will learn? ASP .NET framework provides a native and powerful scripts optimization engine that is very easy to use. In this blog post, I will go through how you can handle your website scripts in an efficient way using bundle and minification techniques. After going through this step-by-step guide – you know how to…