Base Controller in ASP.NET MVC Application

using LogExpress.ExceptionLogger;
using System;
using System.Globalization;
using System.Web;
using System.Web.Configuration;
using System.Web.Mvc; 
using EnDecryptor;

namespace GPOOH
{
    public abstract class BaseController : Controller
    {
        protected string BaseUrl = "http://localhost:63716/";
        protected string ConnectionString = WebConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;

        protected string[] InputDateFormatsAllowed = {
                                                       "d/M/yy", "d/M/yyyy",
                                                       "d/MM/yy", "d/MM/yyyy", 
                                                       "dd/M/yy", "dd/M/yyyy", 
                                                       "dd/MM/yy", "dd/MM/yyyy",

                                                       "d-M-yy", "d-M-yyyy",
                                                       "d-MM-yy", "d-MM-yyyy", 
                                                       "dd-M-yy", "dd-M-yyyy", 
                                                       "dd-MM-yy", "dd-MM-yyyy",

                                                       "d.M.yy", "d.M.yyyy",
                                                       "d.MM.yy", "d.MM.yyyy", 
                                                       "dd.M.yy", "dd.M.yyyy", 
                                                       "dd.MM.yy", "dd.MM.yyyy"

                                                    };

        protected CultureInfo myCulture = new CultureInfo("bn-BD-gp");

        /// <summary>
        /// Encryption
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        protected string EnCrypt(string str)
        {
            string enccryptedText = Encryptor.Encrypt(str);
            return enccryptedText;
        }

        /// <summary>
        /// Decryption
        /// </summary>
        /// <param name="encryptedText"></param>
        /// <returns></returns>
        protected string DeCrypt(string encryptedText)
        {
            string deccryptedText = Decryptor.Decrypt(encryptedText);
            return deccryptedText;
        }


        protected void LogException(Exception exception)
        {
            var path = HttpContext.Server.MapPath("~/App_Data");
            ExceptionLog.Create(exception, path);
        }  
    }
}


//Usage

public class SearchController : BaseController
{
    public ActionResult Index()
    {
        try
        {
            using (SqlConnection connection=new SqlConnection(this.ConnectionString))
            {

            }
        }
        catch (Exception Ex)
        {
            this.LogException(Ex);
        }
        
        return View();
    }
}

Fixing the duplicate controller names in ASP.NET MVC

//Edit App_Start > RouteConfig.cs
 public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
 
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces:  new[] {"ManagementDevelopmentProgram.Controllers"} //add this line
            );
        }
    }
    
 //Edit Areas > YourAreaName > YourAreaNameAreaRegistration.cs
 public override void RegisterArea(AreaRegistrationContext context) 
 {
     context.MapRoute(
         "Admin_default",
         "YourAreaName/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional },
         new[] { "YourAppName.Areas.YourAreaName.Controllers" } //add this line
     );
}