Telerik Forums
Reporting Forum
1 answer
235 views

While rendering report got Error like this Error loading the report viewer's templates. (trvTemplateUrl = 'https://abcdf.com/api/reports/resources/templates/telerikReportViewerTemplate-16.0.22.225.html/').  when i try this same telerik reporting from other domain it's working only this domain it gave this error. and network it shows like CORS error. we don't know where to allow all the domain address.       In Asp.net we have this config to enable CORS          



  services.AddCors(c =>
            {
                c.AddPolicy("AllowOrigin", options => options.AllowAnyOrigin().AllowAnyHeader().WithExposedHeaders("X-total-count")); 
                c.AddPolicy("ReportingRestPolicy", corsOptions => corsOptions.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
            });



            app.UseCors("ReportingRestPolicy");
And We noticed that if i try to run domain1 with chrome and domain2 with Edge. both domains are working.  In same browser which domain i run first that works. If i try to run next domain it gives error.
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?