In the asp.net core application, I want to write Authorization middleware on my own . I am trying to implement it similar to Example 2. But if I try to use I get compilation er