开发者

Autofac 2.2 and ASP.NET MVC 2.0 Areas support

开发者 https://www.devze.com 2023-01-10 04:20 出处:网络
In his blog Nicholas announced support for ASP.NET MVC 2.0 Areas. However, I couldn\'t get it working and from what I see in Autofac sourcecode, areas support is nowhere to be seen. More specifically,

In his blog Nicholas announced support for ASP.NET MVC 2.0 Areas. However, I couldn't get it working and from what I see in Autofac sourcecode, areas support is nowhere to be seen. More specifically, RegisterControllers

return builder.RegisterAssemblyTypes(controll开发者_StackOverflowerAssemblies)
    .Where(t => typeof(IController).IsAssignableFrom(t) &&
        t.Name.EndsWith("Controller"));

does not mention areas anywhere, nor does AutofacControllerFactory.

Am I missing something obvious here?


I believe that Areas continue to work in the same way as they would without the Autofac controller factory - just follow the usual setup for Areas and things should just work.

0

精彩评论

暂无评论...
验证码 换一张
取 消