Support long-polling keep alives on the .NET client

#1781