1
votes

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?

2

2 Answers

1
votes

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
0
votes

In my case deleting the obj folder fixed the problem