1
Visual Studio에서 작동하는 MVC3 응용 프로그램이 있지만 웹 서버에 게시하면 요청 된 URL :/App/Account/LogOn에 404가 반환됩니다. 문제는 계정 컨트롤러 또는 LogOn 작업을 만들지 않은 것입니다. Account/LogOn이로드되는 이유 또는 해결 방법이 확실하지 않습니다. 감사.404 with ASP.net MVC3 및 ninject.web.mvc
내 global.asax.cs 파일은 다음과 같다 :
public class MvcApplication : NinjectHttpApplication
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
//filters.Add(new HandleErrorAttribute());
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
// Create ninject kernel
protected override IKernel CreateKernel()
{
var kernel = new StandardKernel();
// Add bindings
kernel.Bind<IEmployeeRepository>().To<EFEmployeeRepository>();
kernel.Bind<IDocumentRepository>().To<DocumentRepository>();
// Load kernel
kernel.Load(Assembly.GetExecutingAssembly());
return kernel;
}
// Replaces App_Start() when using Ninject
protected override void OnApplicationStarted()
{
base.OnApplicationStarted();
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}
}
Doh! - 고마워. =) – decompiled