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 38:     protected async Task LoadData()
Line 39:     {
Line 40:         item = await StrapiDtoCollections.ExcursionBySlugGetAsync(slug);
Line 41:         this.MyPageModel.ItemId = item.Id.ToInt();
Line 42:         this.MyPageModel.ItemTitle = item.Title;

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

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Tendo.Strapi.Api.<GetExcursionAsync>d__3.MoveNext() +608
   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.<ExcursionBySlugGetAsync>d__32.MoveNext() +365
   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\excursions\excursions-detail.aspx.cs:40
   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