I had this same problem "allowDefinition='MachineToApplication' beyond application level" and after a lot of experimentation and research on the net I believe I have found the problem. I have since seen several posts to fix this problem. However, I thought I would write a quick and easy solution, with little confusion.
The problem has to do with having two Web.config pages. The book instructs you to start a new website at c:\BegASPNET2\Chapters\Start\Chapter03. If you do this you will have included a web.config at the root of your new Website (Chapter03) and have one inside the WroxUnited folder. Having 2 web.configs causes these weird errors. To fix this problem I simply started my new website inside the Wrox United Folder and presto no more irritating message.