首页 > 解决方案 > Hangfire:不断返回 System.ArgumentNullException

问题描述

我的 API 正在尝试运行 hangfire 后台作业,但一直给我这个错误消息:

Hangfire.AutomaticRetryAttribute[0]
Failed to process the job '14525': an exception occurred. Retry attempt 7 of 10 will be performed in 00:22:40.
System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
at System.IO.Path.Combine(String path1, String path2)
at Aftermarket.Server.Common.PqatExport.PQATExportHandler.TransferLogs(Boolean debugMode) in /src/Aftermarket.Server.Common/PQAT_Export/PQATExportHandler.cs:line 90
at Aftermarket.Server.Common.PqatExport.PQATExportHandler.DoTheExport() in /src/Aftermarket.Server.Common/PQAT_Export/PQATExportHandler.cs:line 60

现在第 60 行只是调用第 90 行所在方法的行,它看起来如下: 在此处输入图像描述

现在我检查了 Console.writle 以确保 _rooDir 不为空(它包含一个“/save/blob”字符串)我仍然得到这个 Null Argument 问题?这是为什么 ?

标签: hangfireargumentnullexception

解决方案


推荐阅读