views:

39

answers:

1

I am creating a .NET MVC (1.0) facebook application using FBML. Everything is working like expected. However, if I simply change the project to reference the System.Web.Mvc 2.0 assembly, the application stops working. No exceptions are thrown (it makes it through the controller class fine) but nothing is rendered on the page? Any ideas?

Edit #2: If I strip away all FBML, I still having nothing rendered. Now I've stripped it down to the following. Again, this works great when I reference the Mvc 1.0 assembly

Index.aspx

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
Inside Index
 </asp:Content>

Site.Master

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
Master Page

Home Controller

[FacebookAuthorization(IsFbml = true)] 
public ActionResult Index()
{
  var api = this.GetApi();
  ViewData["userId"] = api.Session.UserId;
  return View();
}
A: 

You need to add the assembly binding in the web.config file. See this question for details.

Ryan