here is my code
products.service:
updateCategorie(ucategorie: Icategorie) {
const endpoint = this.url + 'api/Category/Edit';
const headers = new Headers();
headers.append('Authorization', 'Bearer ' + localStorage.getItem('access_token'));
const options = new RequestOptions({
  headers: headers
});
console.log('access_toke: ', localStorage.getItem('access_token'));
return this.http.put(endpoint, ucategorie, options)
.pipe(map((res) => {
  return res.json();
})).toPromise();
all the fields are not null and the access token is being sent product.component.ts:
updateCategorie() {
this.spinner.show();
console.log('catudata: ', this.categorieudata.value);
this.authent.updateCategorie(this.categorieudata.value).then((res) => {
  if (res) {
    this.spinner.hide();
    if (confirm(this.categorieudata.value.Category_name + 'have been updated')) {
      this.ngOnInit();
    }
  }
}, (err) => {
  this.spinner.hide();
  if (confirm('An error occured please try again')) {
    this.ngOnInit();
    console.log('###error: ', err);
  }
});
}
but i'm getting these error:
Access to XMLHttpRequest at 'http://api-accountingsystem.azurewebsites.net/api/Category/Edit' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
and i used the same method on another request it worked can anyone give me a hand please
 
    