I'm currently doing a carpet replacement, and I'm using the 3M 77 spray on the lids and corners, and indoor/outdoor carpet adhesive for the main areas.
Working good so far, the spray has a VERY potent odor, make sure you use it in a ventilated area.