Well,gassing would kill the entire life of the bin and composting wouldn't happen anymore.Maggots (and the eggs from which they come) are relativly small oxigene consumers so the gas dose would have to be severe.
Once you have the flies it is difficult to get rid of them as long as they are still in the bin, in the contents of it. Empty the content of the bin out in the open.Let sunshine get onto the maggots , birds are helpfull too. Then ,when restarting the compost bin , throw in now and then some compost accelerator. Maggots love it very moist , so when adding fresh "food" a handfull of sawdust on top of it would stop the flies to lay their eggs in it. Dry peat or - more sustainable- some dry crumbly top soil would do the trick as well . Collect some few buckets of top soil and store them dry to give you a regular supply .
The bigger the compost heap is the more sustainable it is . From a certain size it is self regulating , the foes are fought by the friends , a small world in it self so to speak .The plastic cones ( PVC ?!) are very small and therefore vulnerable to any attack.
heinbloed