web.config and app.config ApplicationSettings being overwritten in ASP.NET

sxanness

New Member
We've got the following projects:
  • Domain.UI.Web
  • Domain.Business
  • Domain.Services.EndPoints
  • Domain.Services.Contracts
  • Domain.Services.Agents
ApplicationSettings are being added to the \[code\]app.Config\[/code\] in for example the \[code\]Domain.Business\[/code\] project:\[code\]<applicationSettings> <Domain.Business.My.MySettings> <setting name="SomeKey" serializeAs="String"> <value>someDummyValue</value> </Domain.Business.My.MySettings></applicationSettings>\[/code\]The keys are added there for the typed accessor that is generated by Visual Studio. However the value is being overwritten by the values from the \[code\]web.config\[/code\] in another project. This is the \[code\]web.config\[/code\] of the \[code\]Domain.Services.EndPoints\[/code\] project.\[code\]<Domain.Business.My.MySettings> <setting name="SomeKey" serializeAs="String"> <value>actual_value</value> </setting> </Domain.Business.My.MySettings></applicationSettings>\[/code\]When I get \[code\]My.Settings.SomeKey\[/code\] from the \[code\]Domain.Business\[/code\] project the value is the \[code\]actual_value\[/code\] from the EndPoints project. And this seems to be happening automagically as I couldn't find any code in our solution that seems to be doing this and I can't get Google to answer my question: What is this? Is this something standard in ASP.NET or WCF? In what version of the framework has this been introduced? Where can I read more about this overwriting behavior?
 
Back
Top