HttpException: Server cannot set status after HTTP headers have been sent

Unfortunately the StackTrace isn’t clear one what’s causing it, only that the issue is that the StatusCode can’t be set after the HTTP Headers have been sent. Do you know how to rerpo the issue?