Base solution for your next web application
Open Closed

CORS problem with DevExpress report #6060


User avatar
0
fourier created

I have followed these steps and can get the reports to work if I create a new project from scratch: https://documentation.devexpress.com/XtraReports/400197/Create-End-User-Reporting-Applications/Web-Reporting/JavaScript-Reporting/Document-Viewer/Server-Side-Configuration/Server-Side-Configuration-ASP-NET-Core

If I create and try and access the reports in the aspnet zero framework I get this error: Access to XMLHttpRequest at 'http://localhost:22742/DXXRDV' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried a few things in the startup project wrt CORS but nothing is working. Can you please help?


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Their order is also important

    app.UseCors(//...)
    app.UseDevExpressControls();
    
  • User Avatar
    0
    fourier created

    Anyone with code for a sample report working with Angular and Core?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @fourier

    Could you check server-side log file and see if there are any error messages ? The log file is located like App_Data/Logs/Logs.txt.

    There might be some missing request headers which are required for DexExpress report.