我对this.i很新,新安装的kentico cms,每当我尝试访问localhost网站时,它都托管在IIS服务器中,出现此错误。
这是我的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#" %>
我在这里错过了什么,请帮忙。我几个小时被困在这里
最终我找到了解决方案,但我不知道这是解决此问题的最佳方法,因为我是新来的。
我已更改
Codebehind="Global.asax.cs"
to
CodeFile="Global.asax.cs"
在Global.asax文件中
并且正在运行。
请让我知道这是否不是一个好的解决方案。