See SO https://stackoverflow.com/questions/59361749/resolveendpointfailedexception-there-are-1-parameters-that-couldnt-be-set-on