System.NullReferenceException

Object reference not set to an instance of an object.

Exception source: App_Web_nxvqkg00

Exception string:

System.NullReferenceException: Object reference not set to an instance of an object. at Controls_Portals_2_usercontrols_gallery_gallerydetails.loadProduct(String Id) in D:\Websites\Caracole\Portal\controls\portals\2\usercontrols\gallery\gallerydetails.ascx.vb:line 24 at Controls_Portals_2_usercontrols_gallery_gallerydetails.Page_Load(Object sender, EventArgs e) in D:\Websites\Caracole\Portal\controls\portals\2\usercontrols\gallery\gallerydetails.ascx.vb:line 12 at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Object reference not set to an instance of an object.

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:         Me.fDisplayName.Value = Profile.DisplayName
Line 23:         Dim product As Caracole.Entities.CatalogItems = Caracole.Data.DataRepository.CatalogItemsProvider.GetById(Id)
Line 24:         Dim groupCats As Caracole.Entities.TList(Of Caracole.Entities.CatalogGroupCategories) = Caracole.Data.DataRepository.CatalogGroupCategoriesProvider.Find("CategoryId=" + product.CategoryId.ToString())
Line 25:         Dim group As Caracole.Entities.CatalogGroups = Caracole.Data.DataRepository.CatalogGroupsProvider.GetById(groupCats(0).CatalogGroupId)
Line 26: 

Source File: D:\Websites\Caracole\Portal\controls\portals\2\usercontrols\gallery\gallerydetails.ascx.vb    Line: 24

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Controls_Portals_2_usercontrols_gallery_gallerydetails.loadProduct(String Id) in D:\Websites\Caracole\Portal\controls\portals\2\usercontrols\gallery\gallerydetails.ascx.vb:24
   Controls_Portals_2_usercontrols_gallery_gallerydetails.Page_Load(Object sender, EventArgs e) in D:\Websites\Caracole\Portal\controls\portals\2\usercontrols\gallery\gallerydetails.ascx.vb:12
   System.Web.UI.Control.LoadRecursive() +70
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Control.LoadRecursive() +189
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3177