Monday, 16 April 2012

How you can fix It's an error to use a section registered as allowDefinition='MachineToApplication' beyond application level

Few Days Ago I got a strange error while I am Uploading my files to the FTP. The error was " Cannot allowDefinition='MachineToApplication' beyond application level " in the web.config file.

After doing R & D for more than an hour I came to know that there are two config files in the FTP and it causing this error.

However there might be some more reasons for the above error to come. Some of are as follows:

1)   If you Have Not configured your asp.net application in IIS:

          If you have not Configure your application to run on IIS First Configure your Site to Run on IIS.For that Create Virtual Directory From IIS and Give Permission to Application (Read,Write)

 2. If Above is Not Problem Then There are Mainly Problem of Two or many Web.Config Exists on your Site.When you Open Some Site and if Software Create Backup of that Application then Software mainly Do Create Subfolder and Copy All Files + Web.Config in Application. Just Remove this Subfolder web.config from Subfolder.  OR See that there are two web.config files of similar nature residing on the in the application.

Note: If you are having a demo folder and in that you are having another web.config file with different nature to that of the  web.config file then it will work fine and will not throw any MachineToApplication error. However if the 2 web config files of same type are there in the root and in the demo folder then it will throw the above error.

Just relax and make your app working. if found any issues just ask me........Happy to code.


 

No comments:

Post a Comment