How to correct it?
"Only files needed to run this application" means any build output files like DLLs and references in the bin folder and any files that have a Build Action of Content.
Since the web.config is neither of these, you'll have to change the publish option to All Project Files, or else copy the web.config manually.