on 2017 Aug 29 12:56 PM
This question is to do with the installation and configuration of Service Layer. Is CORS enabled such that REST requests from the CFG Website can work?
We have issues with authentication from the Web API. In fact so far we have not managed to get this to work. I had originally thought the problem was to do with .Net however I have also repeated the issues using JQuery.
This is the error we get from Firebug:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ……
Here is a sample of the JQuery we are using.
$(document).ready(function(){
$("button").click(function(){
$.ajax({
url:"https://xxxxxx.org.uk:50000/b1s/v1/Login",
crossDomain: true,
dataType: "json",
headers: {
"Host": "https:// xxxxxx.org.uk:50000",
"Content-Type": "application/json; charset=utf-8",
"Cache-Control": "no-cache"
},
data:{ CompanyDB: "TEST",
UserName: "xxxxxxx",
Password: "xxxxxxxx"
},
})
})
});
What we want to achieve is running from our Web site .Net code to perform CRUD via the Service Layer for on-line purchases. We have using Postman managed to authenticate and do other CRUD action. Unfortunately we just can’t get this to work from code.
Any advice that points us in the right direction will be welcome
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.