1

I have built a SP-hosted app that uses REST API calls to get data from a list in the Host Web.

The request (from fiddler) is as simple as this:

GET https://apps-9e73cb0dc879a0.*domain*.com/sites/*hostWeb*/*appName*/_api/SP.AppContextSite(@target)/web/lists/getByTitle('tutor_tasks')/Items?$select=assignedToId,assignedFromId&$top=1&$filter=assignedTo%20eq%20%273%27&@target=%27https://*domain*.com/sites/*hostWeb*%27 

When Host Web site regional settings are Locale are in English, the requests works as expected. But when I change the Local to Greek or some other languages AND it is an on-Premises SharePoint installation , I get Internal Error 500. Changing back to English and it's OK again.

It always works when the exact same app runs on O365 SharePoint no matter what Regional Settings I use.

The tutor_tasks list has nothing really special, two User fields and a text field. Any ideas?

1

I figured this out. When switching to Greek Language, SharePoint also switches Sort Order to Greek automatically. Switching back to General Sort Order fixes this issue. I surelly cannot explain that, but tested it with outher Locales too, and for some reason it does the trick!

  • 1
    It has to do with the way LINQ to SharePoint works. There are other locale-related issues as well, such as reliance on localizable DisplayNames of the fields that will also break your REST calls. See sharepoint.stackexchange.com/questions/58107/… – Alexey Krasheninnikov Nov 2 '14 at 5:25
  • So an obvious solution for all these issues would be to stop using REST and go with the JSOM way? – JohnPan Nov 2 '14 at 21:25
  • Well, if your risk assessment tells you that solution stability and agility requirements outweigh the benefits of simplified data access, then you may decide so. Like I usually do :) – Alexey Krasheninnikov Nov 2 '14 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.