2

フォーム ベース認証を使用して、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(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427

誰かコード/Apx を見て、何か問題があれば教えてください。

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>
4

1 に答える 1

1

私は自分の質問に答えました...ログインコントロールでMembershipProvider = "FBAMembershipProvider"を設定します

于 2012-04-24T17:46:14.583 に答える