The Senate defeated an attempt to repeal the war authorization for the Afghanistan conflict and the fight in Iraq.