We recently upgraded to your latest version and now our custom register page no longer works. We are getting an
Exception Type: System.NullReferenceException Exception Message: Object reference not set to an instance of an object.
Please let us know what you think. The page fails to load, and there is nothing in the load event on the code behind that would cause this in our code.
Below is the custom register page:
<%@ Assembly Name="SPSolutions.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=08a33cc09f006379"%>
<%@ Assembly Name="SPSolutions.CustomRegistration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e9db3057acd9c0f6"%>
<%@ Page Language="C#" Inherits="SPSolutions.CustomRegistration.CustomRegisterPage" MasterPageFile="~/_layouts/simple.master" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SPSolutions" Namespace="SPSolutions.SharePoint.WebControls" Assembly="SPSolutions.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=08a33cc09f006379" %>
<%@ Register Tagprefix="SPSolutions" Namespace="SPSolutions.SharePoint.Delegation.WebControls" Assembly="SPSolutions.SharePoint.Delegation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=08a33cc09f006379" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
<SharePoint:EncodedLiteral text="<%$ Resources:del,Register_PageTitle %>" EncodeMethod="HtmlEncode" runat="server" />
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
<SharePoint:EncodedLiteral text="<%$ Resources:del,Register_PageTitle %>" EncodeMethod="HtmlEncode" runat="server" />
<asp:Label ID="PageTitleLabel" runat="server"></asp:Label>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass" runat="server">
<style>
.ms-bodyareaframe {
padding-left: 4px;
}
</style>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
<table class="ms-descriptiontext" cellspacing="0" border="0" width="100%">
<tr>
<td>
<SharePoint:EncodedLiteral text="<%$Resources:del,Register_PageDescription %>" EncodeMethod="HtmlEncode" runat="server" />
</td>
</tr>
<tr>
<td>
<SPSolutions:DelegationLicenseMessage ID="DelegationLicenseMessage" runat="server" />
</td>
</tr>
</table>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<SharePoint:FormDigest ID="FormDigest" runat="server"></SharePoint:FormDigest>
<SPSolutions:SPScriptManager ID="SPScriptManager" runat="server" />
<asp:ValidationSummary ID="AddUserValidationSummary" DisplayMode="BulletList" HeaderText="<%$Resources:del,AddUserToAuthStore_AddUserValidationSummary_Header %>" CssClass="ms-formvalidation" runat="server" />
<asp:Panel ID="ErrorMessagePanel" runat="server">
<asp:Label ID="ErrorMessageLabel" CssClass="ms-formvalidation" runat="server" />
<br /><br />
</asp:Panel>
<table width="100%" class="propertysheet" cellpadding="0" cellspacing="0" border="0">
<wssuc:InputFormSection id="GeneralSection" Title="<%$Resources:del,AddUserToAuthStore_GeneralSection_Title %>" Description="<%$Resources:del,AddUserToAuthStore_GeneralSection_Desc %>" runat="server">
<Template_InputFormControls>
<wssuc:InputFormControl runat="server" LabelText="Email Address">
<Template_Control>
<wssawc:InputFormTextBox ID="UserNameTextBox" Title="<%$Resources:del,AddUserToAuthStore_UserName_Title %>" class="ms-input" Columns="35" Runat="server" MaxLength=255 />
<wssawc:InputFormRequiredFieldValidator ID="UserNameValidator" ControlToValidate="UserNameTextBox" ToolTip="<%$Resources:del,AddUserToAuthStore_UserNameValidator_ToolTip %>" ErrorMessage="<%$Resources:del,AddUserToAuthStore_UserNameValidator_ErrorMessage %>" BreakBefore="True" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
<wssuc:InputFormControl runat="server" visible="true" LabelText="Confirm Email">
<Template_Control>
<wssawc:InputFormTextBox ID="EmailTextBox" visible="true" Text="" Title="<%$Resources:del,AddUserToAuthStore_Email_Title %>" class="ms-input" Columns="35" Runat="server" MaxLength=255 />
</Template_Control>
</wssuc:InputFormControl>
<wssuc:InputFormControl runat="server" LabelText="Password">
<Template_Control>
<wssawc:InputFormTextBox ID="PasswordTextBox" TextMode="Password" Columns="35" Runat="server" class="ms-input" MaxLength=255 />
<wssawc:InputFormRequiredFieldValidator ControlToValidate="PasswordTextBox" ToolTip="<%$Resources:del,AddUserToAuthStore_PasswordValidator_ToolTip %>" ErrorMessage="<%$Resources:del,AddUserToAuthStore_PasswordValidator_ErrorMessage %>" BreakBefore="True" runat="server" />
<wssawc:InputFormCustomValidator ControlToValidate="PasswordTextBox" OnServerValidate="PasswordMatch_ServerValidate" ErrorMessage="<%$Resources:del,PasswordsDoNetMatch_ErrorMessage %>" BreakBefore="True" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
<wssuc:InputFormControl runat="server" LabelText="<%$Resources:del,AddUserToAuthStore_PasswordConfirm_Label %>">
<Template_Control>
<wssawc:InputFormTextBox ID="PasswordConfirmTextBox" TextMode="Password" Columns="35" Runat="server" class="ms-input" MaxLength=255 />
<wssawc:InputFormRequiredFieldValidator ControlToValidate="PasswordConfirmTextBox" ToolTip="<%$Resources:del,AddUserToAuthStore_PasswordConfirmValidator_ToolTip %>" ErrorMessage="<%$Resources:del,AddUserToAuthStore_PasswordConfirmValidator_ErrorMessage %>" BreakBefore="True" runat="server" />
<wssawc:InputFormCustomValidator ControlToValidate="PasswordConfirmTextBox" OnServerValidate="PasswordMatch_ServerValidate" ErrorMessage="<%$Resources:del,PasswordsDoNetMatch_ErrorMessage %>" BreakBefore="True" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
<tr>
<td colspan="2">Password rules:<br />
1st character must be (a-z), (A-Z).<br />
Minimum of 6 and maximum of 20 characters<br />
Contains character(s) from 2 of the following groups :(a-z),(A-Z),(0-9) and (#$_)
</td>
</tr>
<tr>
<td colspan="2"><asp:Label runat="server" ID="lblValidation" Text="" ForeColor="red" Font-Bold="true"></asp:Label> </td>
</tr>
</Template_InputFormControls>
</wssuc:InputFormSection>
<SharePoint:FormComponent ID="ProfilePropertiesTemplate" ControlMode="display" Visible="false" runat="server" />
<wssuc:InputFormSection id="QuestionAnswerSection" Title="<%$Resources:del,AddUserToAuthStore_QuestionAnswerSection_Title %>" Description="<%$Resources:del,AddUserToAuthStore_QuestionAnswerSection_Desc %>" runat="server">
<Template_InputFormControls>
<wssuc:InputFormControl runat="server" LabelText="<%$Resources:del,AddUserToAuthStore_Question_Label %>">
<Template_Control>
<wssawc:InputFormTextBox ID="QuestionTextBox" Title="<%$Resources:del,AddUserToAuthStore_Question_Title %>" class="ms-input" Columns="35" Runat="server" MaxLength=255 />
<wssawc:InputFormRequiredFieldValidator ID="QuestionValidator" ControlToValidate="QuestionTextBox" ToolTip="<%$Resources:del,AddUserToAuthStore_QuestionValidator_ToolTip %>" ErrorMessage="<%$Resources:del,AddUserToAuthStore_QuestionValidator_ErrorMessage %>" BreakBefore="True" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
<wssuc:InputFormControl runat="server" LabelText="<%$Resources:del,AddUserToAuthStore_Answer_Label %>">
<Template_Control>
<wssawc:InputFormTextBox ID="AnswerTextBox" Title="<%$Resources:del,AddUserToAuthStore_Answer_Title %>" class="ms-input" Columns="35" Runat="server" MaxLength=255 />
<wssawc:InputFormRequiredFieldValidator ID="AnswerValidator" ControlToValidate="AnswerTextBox" ToolTip="<%$Resources:del,AddUserToAuthStore_AnswerValidator_ToolTip %>" ErrorMessage="<%$Resources:del,AddUserToAuthStore_AnswerValidator_ErrorMessage %>" BreakBefore="True" runat="server" />
</Template_Control>
</wssuc:InputFormControl>
</Template_InputFormControls>
</wssuc:InputFormSection>
<wssuc:ButtonSection runat="server">
<Template_Buttons>
<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="FinishButton_Click" Text="Finish" id="BottomFinishButton" AccessKey="f" />
</Template_Buttons>
</wssuc:ButtonSection>
</table>
<!-- password notes -->
<script language="javascript">
function showrules(){
var item = document.getElementById("divPass");
var label = document.getElementById("spanAction");
if(item.style.visibility == "hidden"){
item.style.visibility = "visible";
label.innerText = "(click to hide)";
}
else{
item.style.visibility = "hidden";
label.innerText = "(click to view)";
}
}
</script>
<!--
<div style="position:absolute;left:200px;top:320px;width:680px;font-size:10px;font-weight:bold;">
Password Rules <span onclick="showrules()" id="spanAction">(click to view)</span>:
<div onclick="showrules()" style="background-color:White;visibility:hidden;border-style:solid;border-width:thin;padding:4px;" id="divPass">
Password must begin with an alphabetic character (a-z, A-Z).
<br />
Password cannot be empty and must contain at least six (6) characters, and no more than twenty (20) characters.
<br />
Password must contain at least one character from 2 of the following 4 groups:(a-z),(A-Z),(0-9) and (#$_).
<br />
</div>
-->
</div>
</asp:Content>
5 Comments