Open Closed

File Management Module error on upload (An error has occurred! Error detail not sent by server) #6357


User avatar
0
Sraman created
  • ABP Framework version: v7.4.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server.)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: An error has occurred! Error detail not sent by server.
  • Steps to reproduce the issue: File Management on upload facing above exception on IIS hosted site. But working fine on local.

Please find the logs and screenshot for more details.

2023-12-16 08:37:48.383 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/FileManagement - - - 200 - text/html;+charset=utf-8 387.0893ms 2023-12-16 08:37:48.413 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/__bundles/LeptonX.Global.3A299C03CAD1EEF3E34288B6588D15E3.css?_v=638383090412732429 - - 2023-12-16 08:37:48.414 +01:00 [INF] The file /__bundles/LeptonX.Global.3A299C03CAD1EEF3E34288B6588D15E3.css was not modified 2023-12-16 08:37:48.415 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/__bundles/368F0E1C031CC50BE5261FDB34A71937.A89B1E0F2BC9245444906D70372E112D.css?_v=638383090681184854 - - 2023-12-16 08:37:48.415 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/__bundles/LeptonX.Global.3A299C03CAD1EEF3E34288B6588D15E3.css?_v=638383090412732429 - - - 304 - text/css 2.2149ms 2023-12-16 08:37:48.419 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/api/account/profile-picture-file/9b94faaa-2355-1b22-636a-3a0504007a5a - - 2023-12-16 08:37:48.420 +01:00 [INF] Sending file. Request path: '/__bundles/368F0E1C031CC50BE5261FDB34A71937.A89B1E0F2BC9245444906D70372E112D.css'. Physical path: 'N/A' 2023-12-16 08:37:48.421 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/__bundles/LeptonX.Global.DAA677D32493B4B8AB27E73A1D333C92.js?_v=638383090433087174 - - 2023-12-16 08:37:48.421 +01:00 [INF] The file /__bundles/LeptonX.Global.DAA677D32493B4B8AB27E73A1D333C92.js was not modified 2023-12-16 08:37:48.421 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/__bundles/LeptonX.Global.DAA677D32493B4B8AB27E73A1D333C92.js?_v=638383090433087174 - - - 304 - application/javascript 0.8021ms 2023-12-16 08:37:48.423 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/Abp/ApplicationLocalizationScript?cultureName=en - - 2023-12-16 08:37:48.426 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/Abp/ApplicationConfigurationScript - - 2023-12-16 08:37:48.435 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/__bundles/79BF8EA6E72A80A6DE5808479D5DF35A.BAF7758C7F93EBB1950AEE13138458A8.js?_v=638383090683785249 - - 2023-12-16 08:37:48.436 +01:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2023-12-16 08:37:48.436 +01:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationLocalizationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.ActionResult] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController (Volo.Abp.AspNetCore.Mvc). 2023-12-16 08:37:48.438 +01:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2023-12-16 08:37:48.438 +01:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc). 2023-12-16 08:37:48.439 +01:00 [INF] Sending file. Request path: '/__bundles/79BF8EA6E72A80A6DE5808479D5DF35A.BAF7758C7F93EBB1950AEE13138458A8.js'. Physical path: 'N/A' 2023-12-16 08:37:48.440 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/Abp/ServiceProxyScript - - 2023-12-16 08:37:48.445 +01:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2023-12-16 08:37:48.445 +01:00 [INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc). 2023-12-16 08:37:48.456 +01:00 [INF] Executing endpoint 'Volo.Abp.Account.AccountController.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi)' 2023-12-16 08:37:48.456 +01:00 [INF] Route matched with {area = "account", action = "GetProfilePictureFile", controller = "Account", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.Content.IRemoteStreamContent] GetProfilePictureFileAsync(System.Guid) on controller Volo.Abp.Account.AccountController (Volo.Abp.Account.Pro.Public.HttpApi). 2023-12-16 08:37:48.467 +01:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2023-12-16 08:37:48.468 +01:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 23.2526ms 2023-12-16 08:37:48.468 +01:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2023-12-16 08:37:48.469 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/Abp/ServiceProxyScript - - - 200 44429 application/javascript 29.1305ms 2023-12-16 08:37:48.475 +01:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'. 2023-12-16 08:37:48.476 +01:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2023-12-16 08:37:48.477 +01:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 38.808ms 2023-12-16 08:37:48.477 +01:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2023-12-16 08:37:48.477 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/Abp/ApplicationConfigurationScript - - - 200 8839 application/javascript 50.8338ms 2023-12-16 08:37:48.478 +01:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Content.RemoteStreamContent'. 2023-12-16 08:37:48.483 +01:00 [INF] Executed action Volo.Abp.Account.AccountController.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi) in 26.3274ms 2023-12-16 08:37:48.483 +01:00 [INF] Executed endpoint 'Volo.Abp.Account.AccountController.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi)' 2023-12-16 08:37:48.485 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/api/account/profile-picture-file/9b94faaa-2355-1b22-636a-3a0504007a5a - - - 200 1370 image/jpeg 66.0675ms 2023-12-16 08:37:48.487 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/__bundles/368F0E1C031CC50BE5261FDB34A71937.A89B1E0F2BC9245444906D70372E112D.css?_v=638383090681184854 - - - 200 111763 text/css 72.0014ms 2023-12-16 08:37:48.490 +01:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2023-12-16 08:37:48.497 +01:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 60.6632ms 2023-12-16 08:37:48.497 +01:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2023-12-16 08:37:48.508 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/Abp/ApplicationLocalizationScript?cultureName=en - - - 200 81142 application/javascript 84.6753ms 2023-12-16 08:37:48.529 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/__bundles/79BF8EA6E72A80A6DE5808479D5DF35A.BAF7758C7F93EBB1950AEE13138458A8.js?_v=638383090683785249 - - - 200 889826 application/javascript 93.7422ms 2023-12-16 08:37:48.549 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/api/app/customers - - 2023-12-16 08:37:48.556 +01:00 [INF] Executing endpoint 'Pentapack.MRS.Customers.CustomersAppService.GetListAsync (Pentapack.MRS)' 2023-12-16 08:37:48.557 +01:00 [INF] Route matched with {action = "GetList", controller = "Customers", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.Application.Dtos.PagedResultDto1[Pentapack.MRS.Customers.CustomerDto]] GetListAsync(Pentapack.MRS.Customers.GetCustomersInput) on controller Pentapack.MRS.Customers.CustomersAppService (Pentapack.MRS). 2023-12-16 08:37:48.579 +01:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.PagedResultDto1[[Pentapack.MRS.Customers.CustomerDto, Pentapack.MRS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]]'. 2023-12-16 08:37:48.579 +01:00 [INF] Executed action Pentapack.MRS.Customers.CustomersAppService.GetListAsync (Pentapack.MRS) in 22.1759ms 2023-12-16 08:37:48.579 +01:00 [INF] Executed endpoint 'Pentapack.MRS.Customers.CustomersAppService.GetListAsync (Pentapack.MRS)' 2023-12-16 08:37:48.580 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/api/app/customers - - - 200 - application/json;+charset=utf-8 31.2180ms 2023-12-16 08:37:48.861 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/api/file-management/directory-descriptor?filter=&id=&sorting=name%20asc&skipCount=0&maxResultCount=10 application/json - 2023-12-16 08:37:48.862 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/api/file-management/directory-descriptor/sub-directories?parentId= application/json - 2023-12-16 08:37:48.874 +01:00 [INF] Executing endpoint 'Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi)' 2023-12-16 08:37:48.874 +01:00 [INF] Executing endpoint 'Volo.FileManagement.Directories.DirectoryDescriptorController.GetContentAsync (Volo.FileManagement.HttpApi)' 2023-12-16 08:37:48.881 +01:00 [INF] Route matched with {area = "fileManagement", controller = "DirectoryDescriptors", action = "GetContent", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.Application.Dtos.PagedResultDto1[Volo.FileManagement.Directories.DirectoryContentDto]] GetContentAsync(Volo.FileManagement.Directories.DirectoryContentRequestInput) on controller Volo.FileManagement.Directories.DirectoryDescriptorController (Volo.FileManagement.HttpApi). 2023-12-16 08:37:48.884 +01:00 [INF] Route matched with {area = "fileManagement", controller = "DirectoryDescriptors", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.Application.Dtos.ListResultDto1[Volo.FileManagement.Directories.DirectoryDescriptorInfoDto]] GetListAsync(System.Nullable1[System.Guid]) on controller Volo.FileManagement.Directories.DirectoryDescriptorController (Volo.FileManagement.HttpApi). 2023-12-16 08:37:49.477 +01:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.ListResultDto1[[Volo.FileManagement.Directories.DirectoryDescriptorInfoDto, Volo.FileManagement.Application.Contracts, Version=7.4.2.0, Culture=neutral, PublicKeyToken=null]]'. 2023-12-16 08:37:49.482 +01:00 [INF] Executed action Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi) in 597.2955ms 2023-12-16 08:37:49.482 +01:00 [INF] Executed endpoint 'Volo.FileManagement.Directories.DirectoryDescriptorController.GetListAsync (Volo.FileManagement.HttpApi)' 2023-12-16 08:37:49.498 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/api/file-management/directory-descriptor/sub-directories?parentId= application/json - - 200 - application/json;+charset=utf-8 635.9673ms 2023-12-16 08:37:49.579 +01:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Application.Dtos.PagedResultDto1[[Volo.FileManagement.Directories.DirectoryContentDto, Volo.FileManagement.Application.Contracts, Version=7.4.2.0, Culture=neutral, PublicKeyToken=null]]'. 2023-12-16 08:37:49.606 +01:00 [INF] Executed action Volo.FileManagement.Directories.DirectoryDescriptorController.GetContentAsync (Volo.FileManagement.HttpApi) in 725.6851ms 2023-12-16 08:37:49.606 +01:00 [INF] Executed endpoint 'Volo.FileManagement.Directories.DirectoryDescriptorController.GetContentAsync (Volo.FileManagement.HttpApi)' 2023-12-16 08:37:49.632 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/api/file-management/directory-descriptor?filter=&id=&sorting=name%20asc&skipCount=0&maxResultCount=10 application/json - - 200 - application/json;+charset=utf-8 771.3153ms 2023-12-16 08:37:58.526 +01:00 [INF] Request starting HTTP/1.1 POST http://localhost/api/file-management/file-descriptor/pre-upload-info application/json 53 2023-12-16 08:37:58.550 +01:00 [INF] Executing endpoint 'Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi)' 2023-12-16 08:37:58.557 +01:00 [INF] Route matched with {area = "fileManagement", controller = "FileDescriptors", action = "GetPreInfo", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[System.Collections.Generic.List1[Volo.FileManagement.Files.FileUploadPreInfoDto]] GetPreInfoAsync(System.Collections.Generic.List1[Volo.FileManagement.Files.FileUploadPreInfoRequest]) on controller Volo.FileManagement.Files.FileDescriptorController (Volo.FileManagement.HttpApi). 2023-12-16 08:37:58.577 +01:00 [WRN] The antiforgery token could not be decrypted. 2023-12-16 08:37:58.584 +01:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. 2023-12-16 08:37:58.592 +01:00 [INF] Executing StatusCodeResult, setting HTTP status code 400 2023-12-16 08:37:58.593 +01:00 [INF] Executed action Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi) in 35.9226ms 2023-12-16 08:37:58.593 +01:00 [INF] Executed endpoint 'Volo.FileManagement.Files.FileDescriptorController.GetPreInfoAsync (Volo.FileManagement.HttpApi)' 2023-12-16 08:37:58.620 +01:00 [INF] Request finished HTTP/1.1 POST http://localhost/api/file-management/file-descriptor/pre-upload-info application/json 53 - 302 - - 94.6219ms 2023-12-16 08:37:58.624 +01:00 [INF] Request starting HTTP/1.1 GET http://localhost/Error?httpStatusCode=400 - - 2023-12-16 08:37:58.631 +01:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2023-12-16 08:37:58.646 +01:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2023-12-16 08:37:58.697 +01:00 [INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml. 2023-12-16 08:37:58.727 +01:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'. 2023-12-16 08:37:58.804 +01:00 [INF] Executed ViewResult - view ~/Views/Error/Default.cshtml executed in 113.5833ms. 2023-12-16 08:37:58.804 +01:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 158.3913ms 2023-12-16 08:37:58.804 +01:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2023-12-16 08:37:58.810 +01:00 [INF] Request finished HTTP/1.1 GET http://localhost/Error?httpStatusCode=400 - - - 400 - text/html;+charset=utf-8 186.0299ms


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'.

    Can you try using HTTPS?

  • User Avatar
    0
    Sraman created

    Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'.

    Can you try using HTTPS?

    Yes. If I use https, I'm able to upload files. But delete is throwing the same error.

    I could spot the following error on console,

    DELETE http://localhost/api/file-management/file-descriptor/bb52d808-98ac-1344-4e8c-3a0f863fad33 405 (Method Not Allowed)

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    This is the problem of the IIS server.

    You can check: https://stackoverflow.com/questions/4413455/why-does-http-delete-verb-return-405-error-method-not-allowed-for-my-restful-w

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38