0

I have a strange promblem with DataServices when executing specific query:

http://localhost:58362/DataService.svc/A?$expand=B/C works as expected

http://localhost:58362/DataService.svc/C?$expand=D works as expected

On Query:

http://localhost:58362/DataService.svc/A?$expand=B/C/D I get

{
    odata.error: {
        code: ""
        message: {
            lang: "en-EN"
            value: "An error occurred while processing this request."
        }
    }
}

No exceptions in visual. Just this result without more messages.

Can it be connected with amount of data?

rzelek
  • 3,975
  • 1
  • 33
  • 35
  • Try to get more info about the error: http://stackoverflow.com/questions/2312894/wcf-data-service-how-to-diagnose-request-error?rq=1 – Alberto Oct 16 '14 at 10:46

1 Answers1

0

Problem is solved now.

There was QueryInterceptor, which filtered out some C models. That caused empty C property in some B elements in http://localhost:58362/DataService.svc/A?$expand=B/C/D. Trying expanding with D was breaking the result.

Solution is to prepare QueryInterceptor, which does not filter C models in some situations or prepare QueryInterceptor for B.

rzelek
  • 3,975
  • 1
  • 33
  • 35