Open Closed

Unable to export the file from Dev Express report #2876


User avatar
0
zqasim132 created
  • ABP Framework version: v5.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Have Implemented the DevExpress Reporting in ABP.io and tried to export the file but getting the following error:"

General: Request URL: https://localhost:44393/DXXRDVAngular Request Method: POST Status Code: 400 Remote Address: [::1]:44393 Referrer Policy: strict-origin-when-cross-origin Response Header: access-control-allow-credentials: true access-control-allow-origin: http://localhost:4200 access-control-expose-headers: Content-Disposition date: Sat, 09 Apr 2022 17:56:55 GMT server: Microsoft-IIS/10.0 set-cookie: idsrv.session=.; expires=Fri, 09 Apr 2021 17:56:54 GMT; path=/; secure; samesite=none vary: Origin x-powered-by: ASP.NET

Request Header: :authority: localhost:44393 :method: POST :path: /DXXRDVAngular :scheme: https accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9 accept-encoding: gzip, deflate, br accept-language: en-US,en;q=0.9 cache-control: max-age=0 content-length: 136 content-type: application/x-www-form-urlencoded


6 Answer(s)
  • User Avatar
    0
    andmattia created

    Can you share the log o from server?

  • User Avatar
    0
    zqasim132 created

    Can you share the log o from server?

  • User Avatar
    0
    andmattia created

    it seems a problem related CORS

    I found this on DevExpress Devexpress report using Angular

  • User Avatar
    0
    zqasim132 created

    this is the response headers information when I try to export on simple Asp.net core application with Angular and having the same origin. Is is some thing related to CORS Policy or something

  • User Avatar
    0
    zqasim132 created

    These are my CORS Policy configurations Can you please help me out

    context.Services.AddCors(options => { options.AddPolicy(DefaultCorsPolicyName, builder => { builder .WithOrigins( configuration["App:CorsOrigins"] .Split(",", StringSplitOptions.RemoveEmptyEntries) .Select(o => o.Trim().RemovePostFix("/")) .ToArray() ) .WithAbpExposedHeaders() .WithExposedHeaders("Content-Disposition") .SetIsOriginAllowedToAllowWildcardSubdomains() .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials(); }); });

    public override void OnApplicationInitialization(ApplicationInitializationContext context) {

            var app = context.GetApplicationBuilder();
            app.UseDevExpressControls();
            app.UseCors(DefaultCorsPolicyName);
    } 
    
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Do you post a DTO containing IRemoteStreamContent?

    In your HttpApiModule ConfigureServices method, try adding:

    Configure<AbpAspNetCoreMvcOptions>(options =>
    {
        options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(MyInputDto));
    });
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11