Same voltage of AC as DC (which does not give a shock) may give a shock because of the way AC voltage is measured. Let us say that tolerance of your body to experience a shock is 24 volts. So, you need a 24 V DC source to experience a shock. Whereas, in case of AC, even a source will be able to give you a shock. Because a 17 V AC source (which is the RMS value) has a peak voltage of 24 V (enough to give you a shock).
Read more about relation between RMS and peak value here: Measuring the Sine Wave