What are these !-- and -- marks about? In XML <!-- starts a comment and --> ends it. I guess this messes up the config. At least I would get rid of it.
You run on Windows, do you? Have you tried to run both (scanner and CasparCG server) “as Administrator”? Usually Scanner.exe terminâtes, when it does not have admin privileges and Caspar does not run correctly. You can also use a batch file (or casparcg_auto_restart.bat) to start both programs. If you let that batch file run as Administrator both programs will also be run as admin.