We are using Ej1 Components. We are developing the project with angular4 with typescript and Asp.net core web api .
In that we have using ej-uploadbox for uploading the files . Business logics are wrote in the API . Image are not able to upload in the server .
while trying i have got "Failed to load http://wxxshandev02:8095/api/SafetyAlert/UploadAlertAttachment: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:50549' is therefore not allowed access. The response had HTTP status code 500."
"Cross-Origin Read Blocking (CORB) blocked cross-origin response http://wxxshandev02:8095/api/SafetyAlert/UploadAlertAttachment with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details."
POPrince Oliver Syncfusion Team November 27, 2018 02:23 AM
Thank you using Syncfusion products.
In the API controller, you need to enable CORS (i.e) allow cross origin requests. You can configure CORS policy at application startup in the ConfigureServices method for the UploadboxCoreApi. Kindly refer to the following code snippet.