A system for treating a component of a wastewater system, comprising a foam dispenser unit, and a control system for controlling operation of the foam dispenser unit, wherein the foam dispenser unit dispenses a foaming treatment composition comprising a foaming agent and at least one biological agent, onto surfaces of the wastewater system component.