upgrade fails

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>

Have more questions? Submit a request

5 Comments

  • 0
    Avatar
    Matthew McBride

    We have seen this error in the past when your site's resource files are out of date. The registration page fails to load the profile attribute template due to the missing resource files. Theoretically this problem can be fixed by performing the following stsadm command.

    stsadm -o copyappbincontent

    This command is identified in item 6 on the ExCM upgrade page found here...

    http://help.sharepointsolutions.com/products/excm/webframe.html?Installation_UpgradingExCM.html

    However, sometimes this command fails to work correctly. This command should update the files in your 'IIS_VirtualDir\App_GlobalResources' directory with the files from '12\Config\Resources'. Specifically, ExCM uses del.resx and del.en-US.resx. After performing the 'copyappbincontent' command above please verify the size of both resource files. If they are different just manually copy them over to the App_GlobalResources directory. Make sure you do this for every zone in your web application. This typically includes Default and Extranet but may be different depending on your configuration.

  • 0
    Avatar
    Matthew McBride

    Same issue, I ran the stsadm command and I verified that the resources files are the same in the  App_GlobalResources  as the '12\Config\Resources'. Any ideas?

  • 0
    Avatar
    Matthew McBride

    Can you turn off SharePoint's friendly error message feature and post the stack trace info regarding this error?

    (Turn Off SharePoint's Friendly Error Messages)
    http://help.sharepointsolutions.com/products/excm/webframe.html?Troubleshooting_General.html

  • 0
    Avatar
    Matthew McBride

    Object reference not set to an instance of an object.   at SPSolutions.SharePoint.Delegation.ApplicationPages.RegisterPage.EnsureControls()
       at SPSolutions.SharePoint.Delegation.ApplicationPages.RegisterPage.OnInit(EventArgs e)
       at System.Web.UI.Control.InitRecursive(Control namingContainer)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

  • 0
    Avatar
    Matthew McBride

    We have modified a small section of the out-of-the-box registration page that will be required in your custom registration page. Change this section (around line 57)...

    <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="<%$Resources:del,AddUserToAuthStore_UserName_Label %>">

    to this...

    <wssuc:InputFormSection id="GeneralSection" Title="<%$Resources:del,AddUserToAuthStore_GeneralSection_Title %>" runat="server">
            <Template_Description>
                <SharePoint:EncodedLiteral runat="server" EncodeMethod="htmlEncode" Text="<%$Resources:del,AddUserToAuthStore_GeneralSection_Desc %>" />
                <SPSolutions:PasswordInfo ID="PasswordInfo"  HideWhenEmpty="true" runat="server" />
            </Template_Description>
            <Template_InputFormControls>
                <wssuc:InputFormControl ID="InputFormControlUserName" runat="server" LabelText="<%$Resources:del,AddUserToAuthStore_UserName_Label %>">

    Specifically, add the 'InputFormControlUserName' ID to the InputFormControl and add the <Template_Description /> section. These changes allow for ExCM to enforce the user to use an e-mail address as the user name. In addition, this also allows you to configured a password help and password example message. To read about these configuration changes please review the article referenced below..

    (Configuring a web.config file with ExCM settings)
    http://help.sharepointsolutions.com/products/excm/webframe.html?Configuration_ExCM_WebConfig.html

Please sign in to leave a comment.