Open Closed

Unable to Update Tenant Logo #8315


0
smry created

I can go into a tenant settings, select an image, but when I click Upload Image nothing happens

It fails in PROD so I tried to debug locally and it was failing From what I can tell, it never makes it into the TenantCustomizationController or UploadLogo() method

The log for both the local and PROD instance are almost identical Here is the API Log:

    INFO  ,557 [48   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:22742/api/services/app/TenantDashboard/GetSalesSummary?SalesSummaryDatePeriod=1  
    INFO  ,558 [48   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  ,579 [48   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
    INFO  ,580 [48   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'myCompany.Tenants.Dashboard.TenantDashboardAppService.GetSalesSummary (myCompany.Application)'
    INFO  ,584 [48   ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetSalesSummary", controller = "TenantDashboard"}. Executing controller action with signature myCompany.Tenants.Dashboard.Dto.GetSalesSummaryOutput GetSalesSummary(myCompany.Tenants.Dashboard.Dto.GetSalesSummaryInput) on controller myCompany.Tenants.Dashboard.TenantDashboardAppService (myCompany.Application).
    INFO  ,590 [48   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
    INFO  ,591 [48   ] c.Infrastructure.ControllerActionInvoker - Executed action myCompany.Tenants.Dashboard.TenantDashboardAppService.GetSalesSummary (myCompany.Application) in 6.8716ms
    INFO  ,591 [48   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'myCompany.Tenants.Dashboard.TenantDashboardAppService.GetSalesSummary (myCompany.Application)'
    INFO  ,591 [48   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 33.908300000000004ms 200 application/json; charset=utf-8
    DEBUG 55,500 [57   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :00,521 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :05,540 [57   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :10,558 [61   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    INFO  :14,396 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 OPTIONS http://localhost:22742/api/services/app/TenantSettings/GetAllSettings  
    INFO  :14,396 [51   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :14,397 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 0.9847ms 204 
    INFO  :14,414 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:22742/api/services/app/TenantSettings/GetAllSettings  
    INFO  :14,414 [59   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :14,429 [59   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
    INFO  :14,429 [59   ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'myCompany.Configuration.Tenants.TenantSettingsAppService.GetAllSettings (myCompany.Application)'
    INFO  :14,432 [59   ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetAllSettings", controller = "TenantSettings"}. Executing controller action with signature System.Threading.Tasks.Task`1[myCompany.Configuration.Tenants.Dto.TenantSettingsEditDto] GetAllSettings() on controller myCompany.Configuration.Tenants.TenantSettingsAppService (myCompany.Application).
    INFO  :14,445 [62   ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
    INFO  :14,446 [62   ] c.Infrastructure.ControllerActionInvoker - Executed action myCompany.Configuration.Tenants.TenantSettingsAppService.GetAllSettings (myCompany.Application) in 13.996300000000002ms
    INFO  :14,446 [62   ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'myCompany.Configuration.Tenants.TenantSettingsAppService.GetAllSettings (myCompany.Application)'
    INFO  :14,446 [62   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 32.5244ms 200 application/json; charset=utf-8
    DEBUG :15,573 [59   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :20,587 [59   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :25,599 [62   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :30,617 [62   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :35,634 [57   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    INFO  :38,748 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 OPTIONS http://localhost:22742/TenantCustomization/UploadLogo  
    INFO  :38,749 [59   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,750 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1.9428ms 204 
    INFO  :38,763 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://localhost:22742/TenantCustomization/UploadLogo multipart/form-data; boundary=----WebKitFormBoundary{...} 5008
    INFO  :38,763 [59   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,763 [59   ] uthorization.DefaultAuthorizationService - Authorization failed.
    INFO  :38,764 [59   ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was challenged.
    INFO  :38,764 [59   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1.8272000000000002ms 302 
    INFO  :38,769 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 OPTIONS http://localhost:22742/Account/Login?ReturnUrl=%2FTenantCustomization%2FUploadLogo  
    INFO  :38,769 [51   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,770 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1.2115ms 204 
    INFO  :38,775 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:22742/Account/Login?ReturnUrl=%2FTenantCustomization%2FUploadLogo multipart/form-data; boundary=----WebKitFormBoundary{...} 
    INFO  :38,776 [51   ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
    INFO  :38,798 [51   ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
    INFO  :38,799 [51   ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 23.8194ms 404 
    DEBUG :40,640 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :45,645 [51   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG :50,659 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    

The Network shows the following:

Request URL: http://localhost:22742/TenantCustomization/UploadLogo
Request Method: POST
Status Code: 302 Found

Request URL: http://localhost:22742/Account/Login?ReturnUrl=%2FTenantCustomization%2FUploadLogo
Request Method: GET
Status Code: 404 Not Found

2 Answer(s)
  • 0
    maliming created

    hi smry

    May be related https://github.com/aspnetzero/aspnet-zero-core/issues/2797

  • 0
    smry created

    we downloaded v8.1.0 and sure enough that fixed the issue, thanks