ASP.NET-MVC2 预览版 1:是否有任何重大更改? [英] ASP.NET-MVC2 Preview 1: Are There Any Breaking Changes?

查看:16
本文介绍了ASP.NET-MVC2 预览版 1:是否有任何重大更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. I was following Steven Sanderson's 'Pro ASP.NET MVC Framework' book.
  2. On page 132, in accordance with the author's recommendation, I downloaded the ASP.NET MVC Futures assembly, and added it to my MVC project.
  3. Then, without encouragement from the author, I downloaded, installed, and incorporated the ASP.NET MVC2 Preview 1 dlls into my project.
  4. Now, I can no longer load the website.

    1. That is, when I hit F5 in Visual Studio, I get this error.

In retrospect, I think it was a really bad idea to assume that ASP.NET MVC2 Preview 1 would only be additive; but I'd like other people to weigh in.

Has anyone noticed any breaking changes in ASP.NET MVC 2 Preview 1?

Also - Has anyone noticed any changes that impact Castle Windsor?

Also, please let me know if I should be mindful of IIS6 vs. IIS7 ramifications.

解决方案

I had problems with Castle and MVC2 in VS 2010 Beta 2.

I was able to get Castle working with this code for the GetControllerInstance. The problem was that all requests were coming into this (like css files), so just returning null for those seems to work.

protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
     if (controllerType == null) { return null; }

     return (IController)_container.Resolve(controllerType);
}

-Damien

这篇关于ASP.NET-MVC2 预览版 1:是否有任何重大更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆