Generally this happens when you have more than one Web.Config file in your application root folder
Just check if you have more than one. If so, remove the duplicate copies.
Read a similar issue resolved here:ASP.NET 2.0 & "allowDefinition='MachineToApplication'" error message
Other useful link that has similar issue discussed: section registered as allowDefinition='MachineToApplication'