Object variable or With block variable not set.

Server Error in '/' Application.

Object variable or With block variable not set.

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 variable or With block variable not set.

Source Error:


Line 536:    End If
Line 537:    
Line 538:    If ((getNomePagina() = "com_consulta_produto.aspx") And (NSSession("rsCOM_PRODUTO").RecordCount > 0)) Then
Line 539:        ' DataSet para reaproveitar a pesquisa do filtro lateral
Line 540:        Dim vLastFilter As String

Source File: D:\NOVASOLUCOES\Signus.Ecommerce.Net\B2C\com_consulta_produto.aspx    Line: 538

Stack Trace:


[NullReferenceException: Object variable or With block variable not set.]
   Microsoft.VisualBasic.CompilerServices.Container..ctor(Object Instance) +1473026
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +250
   ASP.com_consulta_produto_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\NOVASOLUCOES\Signus.Ecommerce.Net\B2C\com_consulta_produto.aspx:538
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +114
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8817


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