First, we create a project that I was vs 2019 So to create a project like this
Then we can see that the services.AddCors () after we chose startup; add the next chart position
After writing
app.UseCors(builder => builder
.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader()
); The following figure
in
If you write a document with a net api words have commented
This cross-domain success