on 01-27-2017 9:29 AM
hello everyone ,
please i have an error when running my sapui5 application and it can connect to my odata services :
this is below the code that i put to my component.js
var domainString = "document.domain";
domainstring = "*.com";
'Access-Control-Allow-Origin: http://localhost:*';
'Access-Control-Allow-Credentials: true'; 'Access-Control-Allow-Headers: X-KEY';
var oModel = new sap.ui.model.json.JSONModel("http://servnsissap09.wynsys.local:8000/sap/opu/odata/sap/ZHS_SANOFI_WM_SRV/WINNOV_VEKPSet?$format=json",false,"[username]","[password]");
oView.setModel(oModel);
and this is the error that i have :
If you're doing an XMLHttpRequest to a different domain than your page is on. the browser will not allow request of different origin.
If you're using the same origin and still face this error:
try using this chrome extension:
https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi
Btw did you try running your app in Firefox ?
Best
Jawad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.