This is a migrated thread and some comments may be shown as answers.

Error when using aggregates in grid when hosted in azure app service

5 Answers 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 11 Apr 2018, 05:31 AM

I am using the 2018.1.221 Kendo UI for .Net Core.  It is a ASP MVC Core app using .net core 2.

This is a grid with Ajax source - the part having issues is here:

            .DataSource(dataSource => dataSource
                .Ajax()
                .Aggregates(a =>
                {
                    a.Add(l => l.Balance).Sum();
                })
                .Read(read => read.Action("Balances_Read", "Balances").Data("getAccountType"))
                .PageSize(250)
            )

This works fine on my development machine (and on a different site hosted on Azure) but on this particular app service I get this exception.  The exception goes away if I remove the aggregates code.  Here is the stack trace upstream from my call:

 

System.Exception: Unable to build typeDynamicClass3
   at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.EmitType(String typeName, CSharpCompilation compilation)
   at Kendo.Mvc.Infrastructure.Implementation.ClassFactory.GetDynamicClass(IEnumerable`1 properties)
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionNewExpression(IEnumerable`1 propertyValuesExpressions)
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionInitExpression()
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateAggregateFunctionsProjectionMemberBinding()
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.QueryableAggregatesExpressionBuilder.<CreateMemberBindings>d__3.MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Dynamic.Utils.CollectionExtensions.ToReadOnly[T](IEnumerable`1 enumerable)
   at System.Linq.Expressions.Expression.MemberInit(NewExpression newExpression, IEnumerable`1 bindings)
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateSelectBodyExpression()
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilder.CreateSelectExpression()
   at Kendo.Mvc.Infrastructure.Implementation.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery()
   at Kendo.Mvc.Extensions.QueryableExtensions.Aggregate(IQueryable source, IEnumerable`1 aggregateFunctions)
   at Kendo.Mvc.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState, Func`2 selector)
   at Bryt.Client.Web.Controllers.BalancesController.Balances_Read(DataSourceRequest request, Int32 accountType) in C:\DataDrive\Working\Bryt\Bryt.Client.Web\Controllers\BalancesController.cs:line 65

 

Again, oddly, this is isolated to running on Azure.

Thanks,

Brian

 

 

 

5 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 13 Apr 2018, 11:54 AM
Hello,

We are aware of this problem, it is already fixed and included in our internal release. Here is a link to the issue in our public repository. 

Regards,
Boyan Dimitrov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Nhir
Top achievements
Rank 1
answered on 15 Aug 2018, 08:00 PM
Is this issue resolved? Is so what version of Kendo UI?
0
Nhir
Top achievements
Rank 1
answered on 15 Aug 2018, 08:01 PM
I use serveroperation(false) but still get the issue.
0
Nhir
Top achievements
Rank 1
answered on 15 Aug 2018, 08:01 PM
I use serveroperation(false) but still face the issue
0
Boyan Dimitrov
Telerik team
answered on 20 Aug 2018, 02:39 PM
Hello,

Yes, the problem is resolved and included in R2 2018 (version2018.2.516) and later versions.

Regards,
Boyan Dimitrov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Nhir
Top achievements
Rank 1
Share this question
or