Freelance Project Requests Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net


Error in Google Chrome browser in einer Angular application


Access to XMLHttpRequest at 'https://localhost:44388/api/TimeRecords' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.





Insert CORS in ASP.Net Core Startup.cs


In Asp.Net Core

Startup.cs at the Code Block:

1) ConfigureServices

            //*allow Angular,React/Vue access to API

            services.AddCors(options => options.AddPolicy("AllowAccess_To_API ",

                policy => policy






2) Configure

            //*Activate Access to Api from Angular, Vue, Clients





Contact for Jobs, Project Requests: