C# ASP MVC从区域访问Httpcontext

C# ASP MVC从区域访问Httpcontext,c#,asp.net-mvc,model-view-controller,httpcontext,areas,C#,Asp.net Mvc,Model View Controller,Httpcontext,Areas,我正试图通过区域在我的ASP MVC应用程序中实现模块的概念。 我在主解决方案中添加了一个名为TimeSheet的项目(我说它只是作为参考),并将其注册为一个区域,但没有使用Visual Studio模板生成的区域,因此我自己编写了xxxareRegistration.cs(在模块中),并在主应用程序的应用程序启动时使用了AreaRegistration.RegisterAlareas() TimeSheetAreaRegistration.cs(在模块中) Globa.asax(在主应用程序

我正试图通过区域在我的ASP MVC应用程序中实现模块的概念。 我在主解决方案中添加了一个名为TimeSheet的项目(我说它只是作为参考),并将其注册为一个区域,但没有使用Visual Studio模板生成的区域,因此我自己编写了xxxareRegistration.cs(在模块中),并在主应用程序的应用程序启动时使用了AreaRegistration.RegisterAlareas()

TimeSheetAreaRegistration.cs(在模块中)

Globa.asax(在主应用程序中

 protected void Application_Start(object sender, EventArgs e)
    {
        AreaRegistration.RegisterAllAreas();

        WebApiConfig.Register(GlobalConfiguration.Configuration);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        //BundleConfig.RegisterBundles(BundleTable.Bundles);

        // Nascondo la versione di MVC (X-AspNetMvc-Version)
        MvcHandler.DisableMvcResponseHeader = true;



    }
它工作得很好,但我无法访问包含我需要的一些信息的主应用程序的HttpContext。 我做了很多研究,但没有明确的答案


我错过了什么?

遗憾的是,我决定以经典的方式回到各个领域。 这项研究会很有趣,但是我发现了一些零碎的东西,我还没能在合理的时间内找到一个可行的方法……这是我目前所缺乏的

谢谢

 protected void Application_Start(object sender, EventArgs e)
    {
        AreaRegistration.RegisterAllAreas();

        WebApiConfig.Register(GlobalConfiguration.Configuration);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        //BundleConfig.RegisterBundles(BundleTable.Bundles);

        // Nascondo la versione di MVC (X-AspNetMvc-Version)
        MvcHandler.DisableMvcResponseHeader = true;



    }