Telerik Forums
Reporting Forum
1 answer
239 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
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?