Hello,
Somehow I managed to get a LightSwitch HTML5 App (Visual Studio 2013) up and running on our sharepoint test-farm (not perfectly, as there are still some error messages on debug). Now I need the Sharepoint CSOM-Api to recognize users in the app to perform access-control. I am calling the CSOM with the following script in the LS-App (screen.created method):
var scriptloc = sphosturl + "/_layouts/15/";
$.getScript(scriptloc + "SP.Runtime.js", function () {
$.getScript(scriptloc + "SP.js", function () {
SP.ClientContext();
getUser(screen);
});
});
Using firebug I get the following error messages though:
GET http://SITE/sharepoint_h...LClient/Content/Resources/client.lang-EN-US.resjson |
GET http://SITE/sharepoint_h...LClient/Content/Resources/service.lang-EN-US.resjson |
both 401 not found. I get these messages even without adding any code, deploying an empty app. It seems Sharepoint doesnt get the mapping right or something. these files don't exist on the server I deployed the app to. There is only msls.lang-en-us.resjson
and another one, when trying to fetch active (windows auth) user through CSOM:
Sys.InvalidOperationException: Sys.InvalidOperationException: Cannot find current web URL information on the page. from sp.js
Why does sharepoint 2013 seem to incorrectly map json files and how could I get user-recognition working with sharepoint-csom and windows/domain-authentication?
Thank you
--------------------------------------
edit:
when using SP.ClientContext().get_current(); which seems more appropriate I get the same error.