Pomster Pomster - 7 months ago 53
ASP.NET (C#) Question

Error: allowDefinition='MachineToApplication' beyond application level. Running in IIS

I have build a web application that runs fine though Visual studio, but now i have it test it in IIS and receive the following errors.

An error occurred during the processing of a configuration file
required to service this request

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

What changes should i make in web.config or elsewhere to make this work?


This error can means two thinks

  1. You have a web.config on a sub-directory of your web application, that contains definitions that is not allowed for sub-directory
  2. You try to run your site in a sub-directory of your web application with out first make it runable-application