neel neel - 1 year ago 118
ASP.NET (C#) Question

Issue in Global.asax.cs page in MVC4

I my ASP.NET MVC 4 Project, my

page shows the error on


The name 'GlobalConfiguration' does not exist in the current context

I have done many controllers and Views and all... How can I solve this issue and recover my project?

Here is the rest of my code for context

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;

namespace .....
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit
public class MvcApplication : System.Web.HttpApplication
protected void Application_Start()


Answer Source

Make sure you have assembly System.Web.Http.WebHost.dll referenced. This is where GlobalConfiguration is.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download