I have upgraded my application from 2.2 .NET core to 3.1 .NET core. I have one middleware and inject with one service which is working in 2.2 but its not working in 3.1 .NET cor