A: 

"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."

As it says, the Virtual Directory is not being configured as an ASP.NET application. You may have to go to IIS admin console, go to directory properties and do a "Create Application". To do so :

  • Open the IIS Administration Console on the server where the application is published
  • Right click on the Virtual Directory where the application files are published
  • Select Properties, then a "Main Properties" dialog pops up.
  • There is a "Application Settings" section. Just hit "Create" in front of the "Application Name" textbox, then hit "Ok"
  • Check that the Virtual Directory appears with a different icon, it should be ok now.
controlbreak
Thanks for your answer. Could you please give a bit more information about how a have to create an application in IIS. I never worked with it before
Vinzcent
Ok, I described how to do it. I have a old IIS installation. It may differ a bit if your installation is more recent.
controlbreak