“Thread was being aborted” exception raised in excuting Hangfire job
问题 I have a Hangfire (with SqlServer for persistence) job which query some data from database. Then generate an Excel with NPOI with these data, and sent it via Email to users. The data is not so large, only like 1,000 rows. So the job executes in seconds. However, I get "Thread was being aborted" exception when generating Excel or sending mail. I guess there is something like Timeout, which kills the thread. Does anyone have the same issue? Any solutions? 回答1: Alright. Actually I made a stupid