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 28: 
Line 29:                 'if there are rows then the ID is valid
Line 30:                 If theCustomer IsNot Nothing AndAlso theCustomer.Portal.ID = ConfigurationManager.AppSettings("regionid") And theCustomer.Status > Customer.PortalStatus.Disabled  Then
Line 31:                     customerName = theCustomer.CompanyName
Line 32:                     'customerId = theCustomer.ID

Source File: C:\Websites\portals\core\Search\Profile2.aspx.vb    Line: 30

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Search_Profile2.Page_Load(Object sender, EventArgs e) in C:\Websites\portals\core\Search\Profile2.aspx.vb:30
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   BasePage.OnLoad(EventArgs e) in C:\Websites\portals\www.mightymiramichi.com\App_Code\BasePage.vb:100
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4076.0