How to Use Orchard Core CMS to build ASP.NET Core 3.1 Custom Websites?

How to Use Orchard Core CMS to build ASP.NET Core 3.1 Custom Websites?

Need to Build Websites with Microsoft Technology

Think of your situation as a Microsoft developer or someone interested and skilled in Microsoft asp.net core web framework, needing to make a business or personal website. Although how much you may have thought or fancied of developing a professional website using your technology of choice, but the limiting factors are the amount of time or money at your disposal. You shall like to develop a website that looks as good as any other website on the internet with the look and feel as well the functionalities that you would desire. This is what happened to me sometime back when I was also in a similar state of mind, pondering about where to look for guidance in creating a business website using none other than the asp.net core technology that attracts people’s attention. After doing some research on the internet my search ended when I stumbled across the.net foundation’s Orchard Core CMS so I thought of presenting some resources to help the community quickly get a solution to their website development needs sticking to Microsoft .Net stack.

What is Orchard Core CMS?

CMS stands for Content Management System. So what is the content management system? Wikipedia definition says that a content management system or cms are computer software used to manage the creation and modification of digital content. But why do we use the cms at all or put it another way: why do we need to use a content management system? There are many reasons for that and in a nutshell, they are:

  • You can make changes to your website more efficiently and update content dynamically.
  • You can improve the search engine optimization or SEO considerably.
  • Multiple users can create their accounts on the website.
  • It allows you to develop a website by providing a framework

So these are some of the points. Now let’s switch over to see what is a dynamic web page or dynamic website. In the figure 1 below, I am showing you the finished product right now using the orchard core cms how our website appears in look and feel.

Fig. 1

In this website you can see the navigation menu at the top right bar. You can see that it is hosted on localhost in the development environment. It is possible to host it on a hosting server. You’ll be building the same website using orchard core which is .NET foundation’s rewriting of orchard cms for asp.net core. and this is actually what is known as a dynamic website. If you click on any of these links it will automatically scroll to that part of the web page. Once you browse to /admin and log in with your credentials (that you’d provided earlier), the browser looks as in Fig 2 below

Fig 2

Orchard cms is a free open source content management system that allows users to rapidly create websites on the microsoft asp.net platform. Orchard core is redevelopment of orchard cms on asp.net core. Orchard core consists of two different targets: first one is Orchard core framework which is an application framework for building modular multitenant applications on asp.net core and an Orchard core cms, which is a web content management system built on top of the orchard core framework. It is important to note the differences between the framework and the cms.

What are the differences between Orchard Core Framework and Orchard Core CMS?

Some developers who want to develop software as a service applications will only be interested in the modular framework. There are the other type of developers, who want to build administrative websites and will focus on the cms and build modules to enhance their sites or the whole ecosystem. In this post, we have got introduced to the content management system concept and we have seen what is orchard content management system?

Build an Orchard Core CMS Web Application

Now let us fire up the Visual Studio 2019 Community and start creating the Orchard Core CMS application in the next few sections. We shall create an empty ASP.NET Core application using ASP.NET Core 3.1 framework.

Click Next and give the project name Cms.Web in the screen that follows

Click Next and on the Additional Information window choose the .NET 3.1 (LTS) and then Create

Adding NuGet Package

I shall add a NuGet package named OrchardCore.Application.Cms.Targets from Package Manager Console. So browse for the package (include pre-release)

For preview versions we need to do the following:

From Tools => Options => NuGetPackage Manager add a new package source (highlighted below) by clicking the green + icon and fill the Name and Source.

Put Name : OrchardCorePreview and

Source: https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json

Now install the package by accepting the License

Edit the Startup Class

Modify the ConfigureServices method to look as follows:

 public void ConfigureServices(IServiceCollection services)
 {
     services.AddOrchardCms();
 }

Replace the last block of code in the Configure method with

app.UseOrchardCore();

That’s all there is to it for now!!

Run the application

Click Ctrl + F5 to start the application without debugging when you get the setup module

Fill up the Setup as below and click Finish Setup:

On clicking Finish Setup, if everything works well, you should get a screen like this below

Follow Me Here

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.