View Customer Profile Error from Order screen
Posted: Fri Dec 17, 2010 9:52 am
I can a customer profile from the order screen, except when a customer creates an account after placing an order as an anonymous user. Then when I go to the original order and click on customer profile I get the following error;
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 22: CountryCode.DataBind();
Line 23: //INIT ADDRESS
Line 24: Address address = _User.PrimaryAddress;
Line 25: FirstName.Text = address.FirstName;
Line 26: LastName.Text = address.LastName;
Source File: d:\Domains\samssteins.com\wwwroot\Admin\People\Users\AddressBook.ascx.cs Line: 24
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Admin_People_Users_AddressBook.Page_Init(Object sender, EventArgs e) in d:\Domains\samssteins.com\wwwroot\Admin\People\Users\AddressBook.ascx.cs:24
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +77
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 22: CountryCode.DataBind();
Line 23: //INIT ADDRESS
Line 24: Address address = _User.PrimaryAddress;
Line 25: FirstName.Text = address.FirstName;
Line 26: LastName.Text = address.LastName;
Source File: d:\Domains\samssteins.com\wwwroot\Admin\People\Users\AddressBook.ascx.cs Line: 24
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Admin_People_Users_AddressBook.Page_Init(Object sender, EventArgs e) in d:\Domains\samssteins.com\wwwroot\Admin\People\Users\AddressBook.ascx.cs:24
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnInit(EventArgs e) +99
System.Web.UI.UserControl.OnInit(EventArgs e) +77
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Control.InitRecursive(Control namingContainer) +210
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618