无法加载类型'NewSite.MvcApplication'的Kentico

这是我的新手。我新安装的kentico cms,每当我尝试访问localhost网站时,它都托管在IIS服务器中。出现此错误。

无法加载类型'NewSite.MvcApplication'的Kentico

这是我的Global.asax.cs

using System;
using System.Collections.Generic;
using System.Linq;
using system.web;
using system.web.Mvc;
using system.web.Optimization;
using system.web.Routing;

using Kentico.Web.Mvc;

namespace NewSite
{
    public partial class MvcApplication : system.web.HttpApplication
    {
        protected void Application_Start()
        {
            // Enables and configures selected Kentico ASP.NET MVC integration features
            Applicationconfig.RegisterFeatures(ApplicationBuilder.Current);

            // Registers routes including system routes for enabled features
            RouteConfig.RegisterRoutes(Routetable.Routes);

            // Registers enabled bundles
            BundleConfig.RegisterBundles(Bundletable.Bundles);
        }
    }
}

这是我的Global.asax

<%@ Application Codebehind="Global.asax.cs" Inherits="NewSite.MvcApplication" Language="C#" %>

我在这里想念什么,请帮忙。我几个小时就被困在这里

chen477293 回答:无法加载类型'NewSite.MvcApplication'的Kentico

最后我找到了解决方案,但我不知道这是解决此问题的最佳方法,因为我是新手。

我更改了

Codebehind="Global.asax.cs"

CodeFile="Global.asax.cs"

在Global.asax文件中

它正在工作。

请告诉我这是否不是一个好的解决方案。

本文链接:https://www.f2er.com/2980448.html

大家都在问