The following error occured because a web.config file existed, in a directory beneath my main app root dir, should not have been there:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Dev\SVN\authenticationservice\authenticationservice\aspnet_webadmin\2_0_50110\web.config
It is actually valid to have a web.config in a dir beneath your app root dir, but you need to make sure allowDefinition is configured correctly. In my case, however, this file should not have been there - so to fix the problem I just deleted it.
HTH
Tim