5
Proszę spojrzeć na moje Global.asax, umieszczam "problem" w czapkach. Kiedy próbuję budować, mam "The name 'WebApiConfig' does not exist in the current context
Błąd WebApiConfig w Global.asax
Co mi brakuje, Ive dodał Nuget Microsoft.AspNet.WebApi.WebHost
using SportsStore.WebUI.Infrastructure;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace SportsStore.WebUI
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WEBAPICONFIG.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
ControllerBuilder.Current.SetControllerFactory(new
NinjectControllerFactory());
}
}
}
Spróbuj tego: [Problem w stronę Global.asax.cs w MVC4] (http://stackoverflow.com/questions/21402081/issue-in -global-asax-cs-page-in-mvc4) –
Dziękuję jednak, że zajmuje się częścią GlobalConfiguration ... Nie ma to wpływu na Webconfig .. – user2915962
Rozwiązałem problem, tworząc webapiconfig z tej strony: http://www.asp.net/web-api/overview/extensibility/configuring-aspnet-web-api – user2915962