Absorption in the J _ { K _ { - } ,K _ { + } } = 2 _ { 11 } -2 _ { 12 } transition of formaldehyde at 2 cm towards the ultracompact HII regions C1 and C2 of W 58 has been observed with the Very Large Array with an angular resolution of \sim 0.2 ^ { \prime \prime } and a velocity resolution of \sim 1 km s ^ { -1 } . The high resolution continuum image of C1 ( also known as ON 3 ) shows a partial shell which opens to the NE . Strong H _ { 2 } CO absorption is observed against W 58 C1 . The highest optical depth ( \tau > 2 ) occurs in the SW portion of C1 near the edge of the shell , close to the continuum peak . The absorption is weaker towards the nearby , more diffuse compact HII region C2 , \tau \leq 0.3 . The H _ { 2 } CO velocity ( - 21.2 km s ^ { -1 } ) towards C1 is constant and agrees with the velocity of CO emission , mainline OH masers , and the H76 \alpha recombination line , but differs from the velocity of the 1720 MHz OH maser emission ( \sim - 13 km s ^ { -1 } ) . Observations of the absorption in the J _ { K _ { - } ,K _ { + } } = 1 _ { 10 } -1 _ { 11 } transition of formaldehyde at 6 cm towards W 58 C1 and C2 carried out earlier with the Westerbork Aperture Synthesis Telescope at lower resolution ( \sim 4 ^ { \prime \prime } x7 ^ { \prime \prime } ) show comparable optical depths and velocities to those observed at 2 cm . Based on the mean optical depth profiles at 6 cm and 2 cm , the volume density of molecular hydrogen n ( H _ { 2 } ) and the formaldehyde column density N ( H _ { 2 } CO ) were determined . The n ( H _ { 2 } ) is \sim 6x10 ^ { 4 } cm ^ { -3 } towards C1 . N ( H _ { 2 } CO ) for C1 is \sim 8x10 ^ { 14 } cm ^ { -2 } while that towards C2 is \sim 8x10 ^ { 13 } cm ^ { -2 } .