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 93: 
Line 94:             End Using
Line 95:             returnProduct = GetVariant(prod.ErpPartNumber)
Line 96:             If IsNothing(returnProduct) = False Then
Line 97:                 returnProduct.ActualProductId = prod.pkid

Source File: C:\Websites\Live\App_Code\Data\Products\v1\ProductDao.vb    Line: 95

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ProductDao.Get(String webId) in C:\Websites\Live\App_Code\Data\Products\v1\ProductDao.vb:95
   DetailProductView.Initialize(String ConnectionString, String Catalog, Field Item) in C:\Websites\Live\App_Code\Views\DetailProductView.vb:839
   Cb_detailproduct.DisplayDetailProduct(Int32 iThis, String sWebID) in C:\Websites\Live\App_Code\CB_DetailProduct.aspx.vb:76
   Advancedwebpagefunctions.ShowCategory(Boolean bDisplayWebCategory) in C:\Websites\Live\App_Code\AdvancedWebPageFunctions.aspx.vb:762
   Advancedwebpagefunctions.Main() in C:\Websites\Live\App_Code\AdvancedWebPageFunctions.aspx.vb:2296
   ASP.advancedwebpage_aspx.Page_Load(Object sender, EventArgs e) in C:\Websites\Live\advancedwebpage.aspx:15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2853


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