The topic error shows when I add the method in common controller and call that method from Header view file which is located under the Theme => View => Shared in nopcommerce 3.80.

Here is my method which I call from common controller

public ActionResult MobileBrowser()
{
    var browser = Request.Browser;
    System.Web.HttpBrowserCapabilitiesBase myBrowserCaps = browser;
    if (((System.Web.HttpBrowserCapabilitiesBase)myBrowserCaps).IsMobileDevice)
    {
        ViewBag.Message = "mob";
    }
    else
    {
        ViewBag.Message = "web";
    }
    return View();
}

Here is the View file of MobileBrowser method

@if (ViewBag.Message == "mob")
{
    Mobile
}

@if (ViewBag.Message == "web")
{
    Web
}

Here is the Header.cshtml from where I calling MobileBrowser method from common controller

@Html.Action("MobileBrowser", "Common")