You should check the namespace in the file and ensure it is pointing to the right directory where the UserAccessMiddleware is located.