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

500 - Internal Server Error

10 Answers 311 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
tdekoekkoek
Top achievements
Rank 1
tdekoekkoek asked on 06 Jan 2010, 03:19 AM
When I use the Grid in ajax mode with Mindscape Lightspeed, I get an internal server error when I try to sort or perform a filter.  This happens every time when the view is rendered.  There is no error creating the grid model or the view in the controller action.

I also get this when I use NHibernate, though it doesn't happen on sorting, but always on filtering.

My controller action is retrieving an IQueryable<Entity>

Any ideas?

Thanks,

Trevor

10 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 07 Jan 2010, 02:15 PM
Hello tdekoekkoek,

The MVC grid is using our home grown Expression engine which is then pushed to the underlying LINQ provider (Linq2Sql, EF, NH or any other). There is a known problem with filtering and NHibernate. The current LINQ provider for NHibernate does not support the generated expression. I guess the same occurs with Mindscape Lightspeed.
As a workaround you could either implement custom binding (as demonstrated here) or call "ToList()" of your data before passing it to the grid.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
tdekoekkoek
Top achievements
Rank 1
answered on 07 Jan 2010, 03:18 PM
Thanks.  Is there also a problem with sorting?  I am having the same problem with sorting.  I could implement server-side sorting myself, but I would need to know what params are being passed from the grid.

I have implemented sorting with AJAX with other JQuery grids including JQGrid and DataTables.  Both good Jquery plugins, but I am hoping to use the Telerik mvc controls instead as I think in the long run they will be more robust.  But am still not sure at this point
0
Atanas Korchev
Telerik team
answered on 07 Jan 2010, 03:54 PM
Hello tdekoekkoek,

We have not tested with Mindscape so there may be problems with sorting as well. Custom sorting is demonstrated in the custom binding online example. You can also check the related help topic.

I hope this helps,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Grant Chapman
Top achievements
Rank 1
answered on 01 Feb 2010, 05:57 AM
Atanas / Telerik Team,

We have encountered the same issue with the Internal Server 500 error on the filter command when running in Ajax enable mode. We are in early phases of our project and are wondering if it is worth implementing the workaround or if this will be resolved by the time the next release of the ASP.NET MVC components are available.

Do you have a road-map for when this might be resolved, and for when a production ready version of the MVC components are likely to be available?

We are using SharpArchitecture which encapsulates fluent nHibernate.

Regards,
Grant Chapman
0
Atanas Korchev
Telerik team
answered on 01 Feb 2010, 08:32 AM
Hi Grant Chapman,

I am not sure which problem you are referring to. If it is filtering and NHibernate - I am afraid we cannot do anything until this is fixed in the NHibernate linq provider itself. As far as I know with NHibernate 3.0 there will be a brand new LINQ provider implementation with wider support of queries.

I hope this helps,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Grant Chapman
Top achievements
Rank 1
answered on 01 Feb 2010, 11:34 PM
Atanas,

What we have found that is interesting is that all functionality of the grid (sorting + filtering) works when the grid is not running in AJAX mode. Is this non-Ajax filtering not happening via Linq queries?

Regards,
Grant Chapman
0
Atanas Korchev
Telerik team
answered on 02 Feb 2010, 07:44 AM
Hello Grant Chapman,

All grid operations should be using linq queries provided you are not implemented custom binding. Could you please paste some code here so we can check your configuration? Also which version of NHibernate and the linq provider are you using?

Actually there is a workaround to use all the features with NHibernate but it requires to call ToList() of the IQueryable before passing it to the grid. This in return would execute the whole query and return all objects. For small amount of data this may be a viable workaround but for a large number of records I would recommend using custom binding.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris Foster
Top achievements
Rank 1
answered on 02 Jul 2010, 03:17 PM
I have posted a fix for this problem here:


UPDATE: 05-JULY-2010.

Sorry, this fix doesn't actually work as it just falls over at another unimplemented expression.
0
Mark Davis
Top achievements
Rank 1
answered on 30 Jul 2010, 04:03 PM
I'm also getting this error - only in Ajax scenarios - normal server bound linq 2 nhibernate seems to work fine.  

In my case the internal error 500 happens even when the grid is not filterable or sortable.  

The grid tries to load initially using ajax but crashes immediately (i.e. not when it's filtered).  Is there a way I can debug a server 500 error to be sure this is the exact same issue?  Seems to be since I am using l2nh and server binding works..
0
Mark Davis
Top achievements
Rank 1
answered on 30 Jul 2010, 05:53 PM
Correction to the above: I did some more debugging with fiddler and it seems I have some circular reference to sort out.

Cheers!

Mark.
Tags
General Discussions
Asked by
tdekoekkoek
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
tdekoekkoek
Top achievements
Rank 1
Grant Chapman
Top achievements
Rank 1
Chris Foster
Top achievements
Rank 1
Mark Davis
Top achievements
Rank 1
Share this question
or