Click here to Skip to main content
15,891,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I am facing an issue while running classic asp application.

I am getting exception message as "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".

My project contains one web.config file in root level and another web.config in sub folder. I am facing this error in web.config under sub folder section. I am using Visual studio 2008, System OS is Windows 7 and IIS7

Please help me.
Posted
Comments
Andy Lanng 21-Aug-15 6:51am    
It sounds like you have IIS set up wrong. You need to set the folder as an application in IIS. Just find the folder in IIS, right click and click "Convert to Application". This step can always be reverted

1 solution

Why are you using web.config files in a classic ASP application? Regardless, you can't put web.config files in sub folders, you need to make your sub-folder a Virtual Directory so it runs as its own app.
 
Share this answer
 
v2
Comments
Ramesh0809 21-Aug-15 7:54am    
Thanks you for your response. I am new to classic asp configuration. Can you please provide me details how to create Virtual folder for sub folders and all.
F-ES Sitecore 21-Aug-15 8:02am    
Richard Deeming 28-Aug-15 9:52am    
Well, you can put web.config files in subfolders. I do that all the time to control settings for individual folders.

There are some config sections that you can only use at the application level, but others are perfectly fine at the directory level, or even for individual files.

And a virtual directory is not necessarily an application. You can have virtual directories which aren't applications, and you can have applications which aren't virtual directories.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900