开发者

Facebook Markup Language & .NET MVC 2.0

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 th开发者_如何学Goe 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();
}


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜