2012-04-23 62 views
2

我試圖讓使用基於表單的認證,2010年的SharePoint頁面的標誌。 我跟着一個教程,結束了我的項目顯示上述錯誤(對象未設置爲對象的實例)。「的NullReferenceException:對象未設置爲一個對象的實例」與Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage

[NullReferenceException異常:對象引用不設置爲一個對象的一個​​實例] Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage.OnLoad(EventArgs的)119 NDELogin.Layouts.NDELogin.Login.OnLoad(EventArgs的)+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> 
+0

我剛纔已經回答我自己的問題...在登錄控制 – 2012-04-23 22:43:07

+0

您設置的MembershipProvider =「FBAMembershipProvider」設置的MembershipProvider =「FBAMembershipProvider」應該將您的註釋回答自己的問題,然後接受它時,通過2天的等待期已到。 – skeletank 2012-04-24 13:36:33

+0

謝謝,我會的 – 2012-04-24 17:46:49

回答

1

我剛纔已經回答我自己的問題...在登錄控制

+1

你能否更詳細你做了什麼解釋?你的回答對我來說沒有多大意義。 – Anders 2012-11-09 12:57:35

相關問題