Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

I am Jalpesh Vadgama a Microsoft MVP for Visual C# and BrainBench Certified ASP.NET Developer having more then 6 years of experience in .NET Technology.
Browse by Tags · View All
#ASP.NET 88
#DOTNET 87
BRH 79
ASP.NET 72
#.NET 52
C#.NET 48
DOTNET 44
ASP.NET 4.0 31
ASP.NET MVC 29
VisualStudio 27

Archive · View All
December 2010 16
July 2011 13
April 2011 13
April 2012 12
January 2011 12
June 2011 11
May 2011 11
May 2012 8
February 2013 7
January 2013 7

Dividing web.config into multiple files in asp.net

Jul 6 2012 2:49PM by Jalpesh   

When you are having different people working on one project remotely you will get some problem with web.config, as everybody was having different version of web.config. So at that time once you check in your web.config with your latest changes the other people have to get latest that web.config and made some specific changes as per their local environment. Most of people who have worked things from remotely has faced that problem. I think most common example would be connection string and app settings changes.

For this kind of situation this will be a best solution. We can divide particular section of web.config into the multiple files. For example we could have separate ConnectionStrings.config file for connection strings and AppSettings.config file for app settings file.

Most of people does not know that there is attribute called ‘configSource’ where we can  define the path of external config file and it will load that section from that external file. Just like below.

<configuration>
 <appSettings configSource="AppSettings.config"/>
 <connectionStrings configSource="ConnectionStrings.config"/>
</configuration>

And you could have your ConnectionStrings.config file like following.

<connectionStrings>
  <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WebApplication1-20120523114732;Integrated Security=True"
    providerName="System.Data.SqlClient" />
</connectionStrings>

Same way you have another AppSettings.Config file like following.

<appSettings>
  <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  <add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />
</appSettings>
   
That's it. Hope you like this post. Stay tuned for more..
Shout it

Tags: dotnet


Jalpesh
15 · 11% · 3478
7
 
0
Lifesaver
 
 
 
0
Incorrect



Submit

6  Comments  

  • Good one Jalpesh

    Is it support Visual studio 2005? from which version it support?

    Thanks

    commented on Jul 7 2012 12:45AM
    Kirti M.Darji
    10 · 16% · 4985
  • Thank-you, Jalpesh for this tip! Would you happen to know if a similar concept exists for the app.config file for client-server products?

    commented on Jul 7 2012 3:59AM
    Nakul Vachhrajani
    4 · 33% · 10680
  • If my memory is right way back in 2007 itself I remember using this. So hopefully I believe this should be available since .NET 2.0 days.

    commented on Jul 7 2012 9:58PM
    Vadivel
    475 · 0% · 79
  • @Kirti - Yes its from visual studio 2005 and asp.net 2.0 days.

    @Vadivel- Yes but my aim for this post was to make people aware about it. Because lots of people does not know about it.

    @Nakul - I think it should work. I have not tried it. But will try it and get back to you.

    commented on Jul 7 2012 11:18PM
    Jalpesh
    15 · 11% · 3478
  • Jalpesh, I was actually trying to answer Kirti's question. No doubt your post would be useful for many. Keep up the good work.

    commented on Jul 7 2012 11:49PM
    Vadivel
    475 · 0% · 79
  • Really nice one Jalpesh.... Thanks for this tip...

    commented on Jul 10 2012 11:57AM
    Krishnrajsinh Rana
    136 · 1% · 360

Your Comment


Sign Up or Login to post a comment.

"Dividing web.config into multiple files in asp.net" rated 5 out of 5 by 7 readers
Dividing web.config into multiple files in asp.net , 5.0 out of 5 based on 7 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]