Server Error in '/' Application.

The page number requested is larger than the number of pages available.

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: WordPressPCL.Models.WPException: The page number requested is larger than the number of pages available.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[WPException: The page number requested is larger than the number of pages available.]
   WordPressPCL.Utility.<GetRequest>d__19`1.MoveNext() +2015

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4393841
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +13065462
   MomAdvice.BusinessLogic.<>c__DisplayClass13_0.<GetRecentPostsForCategory>b__0() +159
   Pinnacle.Utilities.Caching.DataCache.Get(String cacheKey, Func`1 method, UInt32 expirationSeconds, Byte requestThreshold) +46
   MomAdvice.BusinessLogic.WordpressAPIV2.GetRecentPostsForCategory(Int32 page, Int32 postCount, Int32 categoryID) +267
   MomAdvice.BusinessLogic.Categories.GetPosts(String category, Int32 postCount, Int32 page) +82
   category.GetPostsFromCategory(String categorySlug, Int32 page) +86
   category.GetPosts() +135

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +87
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
   lambda_method(Closure , MethodInfo , Object , Object[] ) +24
   System.Web.UI.WebControls.ModelDataSourceView.InvokeMethod(ModelDataSourceMethod method, Boolean isAsyncMethod) +330
   System.Web.UI.WebControls.ModelDataSourceView.InvokeMethod(ModelDataSourceMethod method) +11
   System.Web.UI.WebControls.ModelDataSourceView.GetSelectMethodResult(DataSourceSelectArguments arguments) +74
   System.Web.UI.WebControls.ModelDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +15
   System.Web.UI.WebControls.Repeater.GetData() +232
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +208
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +62
   System.Web.UI.WebControls.Repeater.DataBind() +77
   System.Web.UI.WebControls.Repeater.EnsureDataBound() +58
   System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +15
   System.Web.UI.Control.PreRenderRecursiveInternal() +88
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883


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