Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 由于ASP.net core blazor应用的SSRS中存在CORS,访问被拒绝_Reporting Services_Cors_Blazor Webassembly - Fatal编程技术网

Reporting services 由于ASP.net core blazor应用的SSRS中存在CORS,访问被拒绝

Reporting services 由于ASP.net core blazor应用的SSRS中存在CORS,访问被拒绝,reporting-services,cors,blazor-webassembly,Reporting Services,Cors,Blazor Webassembly,我想使用.NET 5中的HttpClient从SSRS报告中获取HTML,如下所示: using (HttpClient client = new()) { using (var result = client.GetAsync($"http://localhost/ReportService?blablabla")) { if (result.Result.IsSuccessStatusCode) {

我想使用.NET 5中的HttpClient从SSRS报告中获取HTML,如下所示:

using (HttpClient client = new())
{
    using (var result = client.GetAsync($"http://localhost/ReportService?blablabla"))
    {
        if (result.Result.IsSuccessStatusCode)
        {
            var win = result.Result.Content.ReadAsStringAsync();
            Console.WriteLine(win);
        }
    }
}
但我的请求被CORS阻止:

在'http://localhost/ReportService?blablabla“从 起源'https://localhost:44357'已被CORS策略阻止:否 “Access Control Allow Origin”标头出现在请求的服务器上 资源。如果不透明的响应满足您的需要,请设置请求的 模式设置为“无cors”,以获取禁用cors的资源

我在SQL Server Management Studio中配置了SSR,如下所示:

源“localhost”位于“AccessControlAllowOrigin”中,因此为什么我的请求被阻止

多谢各位

编辑我用来配置SSR

编辑@sle:这是我放置原点时的结果https://localhost:44357 在SSRS配置属性中:


错误消息相同。

您可以使用https://localhost:44357
有关信息,服务器必须在标头上返回客户端的url。

您知道为什么整个uri不工作吗?我不知道如何进一步研究好的,它是有效的,只是我必须知道chrome中的缓存。