The longest-ranged and longest-barreled of the heavy guns deployed in World War I was the Paris Gun, which was used to bombard Paris from a distance of over 130km.
The British attempted to develop weapons to counter the Paris Gun, but none was ready for testing until after the Armistice.