it passible to more than one web.confing file in to one solution

Posted by Rambabu123 under ASP.NET on 10/17/2012 | Points: 10 | Views : 2418 | Status : [Member] | Replies : 3
it passible to more than one web.confing file in to one solution




Responses

Posted by: Srikanthvemula on: 10/17/2012 [Member] Starter | Points: 25

Up
0
Down
Yes

Rambabu123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vasanthmvp on: 10/17/2012 [Member] Starter | Points: 25

Up
0
Down
Yes, it is possible to have more than one web.config file in to a solution. But, You cannot have more than one in to the outer part of solution.
Suppose, i have 3 projects in my Solution.
1. DAL
2. BAL
3. Project (WEB)

For the whole project/solution i can include a web.config file. In case, if you want establish authentication and authorization, roles based authentication (like Eg: A registered user can reply to the post in the forums section of DotNetFunda Site, where as an Admin can see the links that are restricted to only himself). Here, we can separate these pages under Secured Folder (for registered Users) and Admin Folder (Only for Admin/Moderator). So, in order to maintain this permissions over the site pages we include a each web.config file in to these Secured and Admin Folders i.e Sub-Folders.

Under Web site
Web.config
The Web.config file for a specific Web site contains settings that apply to the Web site and inherit downward through all of the ASP.NET applications and subdirectories of the site.

Under ASP.NET application root directory
Web.config
The Web.config file for a specific ASP.NET application is located in the root directory of the application and contains settings that apply to the Web application and inherit downward through all of the subdirectories in its branch.

Under ASP.NET application subdirectory
Web.config
The Web.config file for an application subdirectory contains settings that apply to this subdirectory and inherit downward through all of the subdirectories in its branch.

To have more clear idea on this: refer
http://weblogs.asp.net/jgalloway/archive/2012/01/17/10-things-asp-net-developers-should-know-about-web-config-inheritance-and-overrides.aspx

Awesome Coding !! :)

Rambabu123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 10/18/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
yes, one website can have multiple web.config files, should be located in different folder.
Refer this url
http://www.codeproject.com/Articles/11034/Working-with-more-than-one-Web-config-file

Rambabu123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response