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 34:         string localeIdParam = qs["langId"];
Line 35:         string slug = qs["slug"];
Line 36:         boat = await StrapiDtoCollections.BoatBySlugGetAsync(slug);
Line 37: 
Line 38:         this.MyPageModel.ItemId = boat.BoatId.ToInt();

Source File: c:\HostingSpaces\adriatic-global\tendo.hr\wwwroot\Masters\yachts\yachts-detail.aspx.cs    Line: 36

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Tendo.Strapi.Api.<BoatBySlugGetAsync>d__0.MoveNext() +604
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +29
   Tendo.Code.Web.Lists.<BoatBySlugGetAsync>d__14.MoveNext() +364
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +29
   <LoadData>d__1.MoveNext() in c:\HostingSpaces\adriatic-global\tendo.hr\wwwroot\Masters\yachts\yachts-detail.aspx.cs:36
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64
   System.Web.UI.<ExecuteTasksAsync>d__3.MoveNext() +378
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64
   System.Web.UI.<ProcessRequestAsync>d__554.MoveNext() +855


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