I am working on a web application that has several folders and its pages in the web project. There is also a web.config will all the traditional mark up. I needed to create another folder called "customerportal", in this folder I created 3 pages, \[code\]customerlogin.aspx\[/code\], \[code\]customerdefault.aspx\[/code\] and \[code\]customerhelp.aspx\[/code\]. I also added within that folder 3 folders, images, css and scripts.Now when I navigate to that folder say \[code\]http://mysite.com/customerportal/customerlogin.aspx\[/code\], it works fine. I added a \[code\]web.config\[/code\] file because now I need to retrict this folder to only the roles for customer and likewise I need to restrict the main app (parent) to the clients role. So no client cant get into the customer portal and no customer portal user can get into the main app pages. So I added the mark up that restricts the roles in the child \[code\]web.config.\[/code\], this did not work as it told me that \[code\] Parser Error Message: It is an error to use a section registered asallowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.\[/code\]So, I converted the folder into a virtual directory, and then into an application in the iis. Then the error went away but I encountered other problems like things of the main \[code\]web.config\[/code\] being inherited to the child \[code\]web.config\[/code\]. So i started investigating and I saw a lot of answers likelace a \[code\]<location path="." inheritInChildApplications="false">\[/code\] before the \[code\]<system.web>\[/code\] section, I tried this but now I get an error on the \[code\]<membership>\[/code\] tag. The membership is on a different aspmembership database, so the child has a different connection string etc.. But I am unable to do something like\[code\]<membership> <clear />\[/code\]or a \[code\]<membership> <remove name=..>\[/code\]Its like the membership is still getting inherited somehow. What is the best way to solve this child web.config issues?, what is the best practice to do this kind of setup where the child folder needs its own web.config? It is the first time i do this.