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 41:     {
Line 42:         
Line 43:         boat = await StrapiDtoCollections.BoatBySlugGetAsync(slug).ConfigureAwait(false);
Line 44:         this.MyPageModel.ItemId = boat.BoatId.ToInt();
Line 45:         this.MyPageModel.ItemTitle = boat.Title;

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

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.ConfiguredTaskAwaiter.GetResult() +29
   <LoadData>d__1.MoveNext() in c:\HostingSpaces\adriatic-global\tendo.hr\wwwroot\Masters\speedboats\speedboats-detail.aspx.cs:43
   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