ANK*_*KIT 2 asp.net-core aspnetboilerplate angular
ASP.NET 零(.Net Core v2 + Angular v5)
AbpUserConfiguration/GetAll 有时会中断,在服务了几个请求后,它开始生成跨域问题,其他时候它工作得很好。
以下是错误。
从源“ http://localhost :4200”访问“http://localhost :22743/AbpUserConfiguration/GetAll ”的XMLHttpRequest已被 CORS 策略阻止:“Access-Control-Allow-Origin”标头不存在请求的资源。
获取http://localhost:22743/AbpUserConfiguration/GetAll net::ERR_FAILED
App:CorsOriginsASP.NET Zero 已经正确配置了 CORS 起源允许列表,只需确保在文件中的设置中输入正确的值即可appsettings.json。{
...
"App": {
"ServerRootAddress": "http://localhost:22743/",
"ClientRootAddress": "http://localhost:4200/",
"CorsOrigins": "http://localhost:4200",
...
},
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4359 次 |
| 最近记录: |