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 231:        End If
Line 232:
Line 233:        If pageRequest.QueryString.Count > 0 AndAlso pageRequest.Url.AbsolutePath = pageRequest.UrlReferrer.AbsolutePath AndAlso pageRequest.UrlReferrer.Query.Length > 0 Then
Line 234:            Dim referrerQueryStringCollection = HttpUtility.ParseQueryString(pageRequest.UrlReferrer.Query)
Line 235:            For Each queryParamKey In referrerQueryStringCollection.AllKeys 'Use any previous page params that aren't in current page params (i.e. sort, filters)

Source File: C:\WebSites\Live\App_Code\ProductUtilities.vb    Line: 233

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ProductUtilities.GetCategorySearchProductsUrl(HttpRequest pageRequest) in C:\WebSites\Live\App_Code\ProductUtilities.vb:233
   Category.Page_Load() in C:\WebSites\Live\pages\Category.aspx.vb:51
   BasePage`1.Initialize() in C:\WebSites\Live\App_Code\BasePage.vb:27
   BasePage`1._Lambda$__R0-1(Object a0, EventArgs a1) +34
   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