Asp.net &引用;NullreferenceException:对象未设置为对象的实例;使用Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage

Asp.net &引用;NullreferenceException:对象未设置为对象的实例;使用Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage,asp.net,sharepoint,Asp.net,Sharepoint,我正在尝试使用基于表单的身份验证为Sharepoint 2010创建登录页面。 我遵循了一个教程,最后我的项目显示了上述错误(对象未设置为对象的实例) [NullReferenceException:对象引用未设置为对象的实例。] Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage.OnLoad(EventArgs e)+119 NDELogin.Layouts.NDELogin.Login.OnLoad(EventArgs e)+5

我正在尝试使用基于表单的身份验证为Sharepoint 2010创建登录页面。 我遵循了一个教程,最后我的项目显示了上述错误(对象未设置为对象的实例)

[NullReferenceException:对象引用未设置为对象的实例。] Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage.OnLoad(EventArgs e)+119 NDELogin.Layouts.NDELogin.Login.OnLoad(EventArgs e)+51 System.Web.UI.Control.LoadRecursive()+65 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)+2427

请有人看一下代码/Aspx并告诉我您是否发现任何错误

using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.IdentityModel.Pages;

namespace NDELogin.Layouts.NDELoginc
{
public partial class Login : FormsSignInPage
  {
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
    }
  }
}


    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Assembly Name="Microsoft.SharePoint.IdentityModel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Import Namespace="Microsoft.SharePoint.WebControls" %>

    <%@ Register Tagprefix="SharePoint" 
        Namespace="Microsoft.SharePoint.WebControls" 
        Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="asp" Namespace="System.Web.UI" 
        Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" 
        Inherits=" NDELogin.Layouts.NDELogin.Login, NDELogin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5da7e3f4f8be720c" MasterPageFile="~/_layouts/NDELogin/PublicMaster.master" %>

    <asp:Content ID="Content4" ContentPlaceHolderID="ContentLogin"
        runat="server">
         <SharePoint:EncodedLiteral runat="server"
            EncodeMethod="HtmlEncode" ID="ClaimsFormsPageTitle"
            Visible="false" />
             <SharePoint:EncodedLiteral runat="server"
            EncodeMethod="HtmlEncode" ID="ClaimsFormsPageTitleInTitleArea"
            Visible="false" />

        <SharePoint:EncodedLiteral runat="server"
            EncodeMethod="HtmlEncode" ID="ClaimsFormsPageMessage"
            Visible="false" />
        <asp:Login ID="signInControl" FailureText="<%$Resources:wss,login_pageFailureText%>"
            runat="server" Width="100%" DisplayRememberMe="false" />
    </asp:Content>
使用系统;
使用Microsoft.SharePoint;
使用Microsoft.SharePoint.WebControl;
使用Microsoft.SharePoint.IdentityModel.Pages;
命名空间NDELogin.Layouts.NDELoginc
{
公共部分类登录:FormsSignInPage
{
受保护的覆盖无效加载(事件参数e)
{
基础荷载(e);
}
}
}

我刚刚回答了我自己的问题。。。在登录控件上设置MembershipProvider=“FBAMembershipProvider”

我刚刚回答了我自己的问题。。。在登录控件上设置MembershipProvider=“FBAMembershipProvider”。您应该将您的评论移动到您自己问题的答案中,然后在2天等待期结束时接受。您可以更详细地解释一下您所做的吗?你的回答对我来说没有多大意义。