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

Setting lot of filter criterias in GridView triggers "The maximum uri length of 2083 was exceeded"

1 Answer 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 07 Sep 2011, 09:34 AM
Hi

In our silverlight 4 application, that uses ria services in combination with the latest telerik GridView, we have encountered a problem.
When I set a lot of filter criterias (Distinct filters) then i recieve the following error:

The maximum uri length of 2083 was exceeded

I am aware that this is a browser constraint that limits the size of the request and not truly the fault of the gridView or filter control. However, I would still be interested if there was a way to work around this error. Some ideas:

- compress request part of URI
- analize filter criterias and possible merge them (Example: distinct filter criterias for the values: 1,2,3,4,5,6 could be combined to: is bigger than 1 and is smaller than 7, just for the request)
- other possibilities?

I would be very glad if you had any solution

Greetings 

1 Answer, 1 is accepted

Sort by
0
Dominik
Top achievements
Rank 1
answered on 07 Sep 2011, 09:50 AM
I have already found a solution for the error "The maximum uri length of 2083 was exceeded" in combination with ria services:

Just set the Query(HasSideEffects-attribute to true on the serverside ria query method. Example:
  [Query(HasSideEffects = true)]  // query is sent via post (to avoid error: "The maximum uri length of 2083 was exceeded")
        public IQueryable<Anforderung> GetAnforderungSet()
        {
            CheckAuthentication();
            var user = this.GetCurrentUser();
            return GetAnforderungSet(user);
        }

This will cause the request to be a post request. Be aware that there may be side effects (also see posted links)

See also the following links.

http://jasonharper.wordpress.com/2009/09/27/ria-services-under-the-hood-part-2-query-operations/

http://jasonharper.wordpress.com/2009/09/27/ria-services-under-the-hood-part-2-query-operations/
Tags
GridView
Asked by
Dominik
Top achievements
Rank 1
Answers by
Dominik
Top achievements
Rank 1
Share this question
or