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 96:       </div>
Line 97:           <div>
Line 98:       <% if (NumPortal == 1907 && TipoElementoId == 39) %> <% { %>
Line 99:     <a href="https://www.itarana.es.gov.br/acesso-informacao" style="width: 20%;"  class="btn btn-primary" target="blank"><i class="far fa-external-link-square fa-fw" aria-hidden="true" style="margin-right:10px;"></i>E-SIC</a>   <% } %> <% else  %> <% { %> <% } %>
Line 100:</div>

Source File: c:\inetpub\portaltp-geral\consultas\documentos.aspx    Line: 98

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Portal.PortalHelper.GetSessionChaveInt(Page oPagina, String Nome) in C:\el\projetos\ctgi-dotnet-portaltp\Portal\Portal.Helper.cs:1808
   Portal.consultas.documentos.get_TipoElementoId() in C:\el\projetos\ctgi-dotnet-portaltp\Portal\consultas\documentos.aspx.cs:33
   ASP.consultas_documentos_aspx.__RendercontentDocumentos(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\portaltp-geral\consultas\documentos.aspx:98
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +95
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +253
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +204
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132
   ASP.common_principal_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\portaltp-geral\common\Principal.Master:41
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +95
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +253
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +132
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +9490


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