Note that there are some explanatory texts on larger screens.

plurals
  1. PONullReferenceException thrown on a select case statement. Any ideas why?
    primarykey
    data
    text
    <p>This error occurs occasionally in Production but I can't reproduce it in DEV </p> <pre><code>System.NullReferenceException: Object reference not set to an instance of an object. at CommandCenterHeader.ascx.vb:line 23 at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) 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) </code></pre> <p>CommandCenterHeader.ascx.vb:line 23 is "Select Case Me.CurrentUser.UserType.ToLower"</p> <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then Select Case Me.CurrentUser.UserType.ToLower Case "e", "f" lbtnccadmin.Visible = True lbtnccadmin.NavigateUrl = "/commandcenter/cc_admin.aspx" Case Else lbtnccadmin.Visible = False End Select End If End Sub &lt;ComponentModel.Browsable(False)&gt; _ Protected ReadOnly Property CurrentUser() As CypStdLib.FL.QuotesDB.tblUserInfo Get If (Not IsNothing(Request.Cookies(cookieKey))) AndAlso (Not IsNothing(Request.Cookies(cookieKey)("userid"))) Then Dim uid As String = Request.Cookies(cookieKey)("userid") &amp; "" If uid &lt;&gt; "" AndAlso IsNumeric(uid) Then Dim curruser As New CypStdLib.FL.QuotesDB.tblUserInfo If curruser.LoadByPrimaryKey(CLng(uid)) Then Session("CurrentUser") = curruser Return curruser End If End If End If Return Nothing End Get 'Set(ByVal value As CypStdLib.FL.QuotesDB.tblUserInfo) ' Current.Session("CurrentUser") = value 'End Set End Property </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload