Retirement tax questions

I believe there has to be some business taxes paid to the state. Also sale taxes. But I could be totally wrong.

Basically my question boils down to this:
Can I "subcontract"  all the work - for which I am getting the 1099 - to my S-corp/LLC and pay the taxes as S-corp (Schedule C, I believe)?  This way my taxable income from 1099 becomes zero because my expenses (what I paid to my S-corp for the work done) are equal to what I received on 1099. Zero income -> zero tax.

Is this legal? Any red flags?  I am just trying to save on the Social Security tax: my W-2 salary from my S-corp will be less than what I am getting on 1099. 
Thank you!