c# a task was canceled code example Example: A task was canceled. clientHttp.Timeout = TimeSpan.FromMinutes(30);