大家好,
我正在尝试开发一个 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();
}
}
}