Yes, I know I can add web.config file under directory but you can not add
My Directory stucture is as followed and my virtualdirectory name is "OnlineDemo"
OnlineDemo
- App_themes
onlinedemo
stylesheets.css
onlinedemo.skin
- Public
Registration.aspx
- Globals
Public.master
- Admin
default.aspx
- Web.config
- Login.aspx
In Web.config
<forms name="onlinedemo" defaultUrl="Admin/Default.aspx" />
</authentication>
Now, I have to add one more Directory called "Speaker" and if user wants to access it user need to login. Now question is how it is possible? as only one
I created another virtualdirecoty under OnlineDemo called "Speakers". and there I put the web.config file.
<forms name="Sepakers" path="/" loginUrl="login.aspx"/>
</authentication>
So it will overwrite all the web.config setting from root Web.config. Here I soloved the problem of authentication.
Now, I have another problem occured how to share the Themes and Master page between two application. I do not want to copy and past under Speaker directory b'coz then I have to maintain 2 copies of Themes and Master Page.
Go to IISRight click on OnlineDemo --> Speaker --> New --> Virtual Directory give name App_Themes , Set the path to the App_themes finish.
Then right click on App_themes (Virtual Direcoty not folders). go to property --> Virtual Directory Tab Remove Application Name ("Remove" Button ) and Execute Permissions : Select "Script Only" from dropdown. follow same process for Globals.
And for Theme put <pages styleSheetTheme="onlinedemo">
Now when you create new page under Speakers. give the MasterPageFile="~/Globals/Public.master"