我已经使用 Nuget 包在我的 .Net 项目中安装了 Sensenet Services 和 Sensenet ECM Webpages 包,并按照自述文件中提到的安装步骤进行操作。
我的 Global.asax 的标记看起来像
<%@ Application Codebehind="Global.asax.cs" Inherits="SenseNet.Portal.Global" Language="C#" %>
我的 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;
namespace SensenetDemoApplication
{
public class MvcApplication : System.Web.HttpApplication
{
public void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
public class Global : SenseNet.Portal.SenseNetGlobal
{
protected override void Application_Start(object sender, EventArgs e, HttpApplication application)
{
try
{
MvcApplication original = new MvcApplication();
original.Application_Start();
base.Application_Start(sender, e, application);
}
catch (Exception )
{
throw;
}
}
}
}
在调试模式下,应用程序启动并初始化所有组件。但是当它到达用于启动应用程序的隐式代码“ base.Application_Start(sender, e, application); ”时,调试器不会返回或没有异常抛出,只是应用程序无限运行而没有输出。你能帮我看看我的代码有什么问题吗?