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 32:         dsPhotos = Session("Photos")
Line 33: 
Line 34:         Dim photoRow() As Photos.PhotoRow = dsPhotos.Photo.Select("id = '" & photoId & "'")
Line 35: 
Line 36:         If photoRow.Length <> 1 Then

Source File: C:\HostingSpaces\WCHFFA\wchffa.com\wwwroot\PhotoViewer.aspx.vb    Line: 34

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   PhotoViewer.loadPhoto(Int32 photoId) in C:\HostingSpaces\WCHFFA\wchffa.com\wwwroot\PhotoViewer.aspx.vb:34
   PhotoViewer.Page_Load(Object sender, EventArgs e) in C:\HostingSpaces\WCHFFA\wchffa.com\wwwroot\PhotoViewer.aspx.vb:19
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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