无法加载类型错误

时间:2012-04-22 12:04:07

标签: asp.net facebook facebook-c#-sdk

大家好

我正在尝试开发一款Facebook游戏,但我对这个主题很陌生。 当我在visual studio上调试时,页面出现没有错误,但当我将它发布到我的网站时,错误页面正在评估。

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Could not load type 'Xandra.index'.

Source Error: 
 Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Xandra.index" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Apps/Web/Xandra/Index.aspx    Line: 1 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

我的源代码是:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Facebook;
using Facebook.Web;
using Facebook.Session;

namespace Xandra
{
    public partial class index : Facebook.Web.CanvasIFrameBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            CanvasSession fs = new Facebook.Session.FBMLCanvasSession(Config.APIKey, Config.Secret);
            base.RequireLogin = true;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            long uid = (long)base.Api.Users.GetInfo().uid;
            Button1.Text = uid.ToString();
        }
    }
}

1 个答案:

答案 0 :(得分:0)

您是否也部署了所有正确的汇编文件(/ bin)?