Hi YahHong, thanks for the reply. I now understand that we could create our
own CSP for this....just a little more work.
As for my question, let me explain the scenario. We have multiple dev teams
working on multiple dev projects. I'm looking to create a "standard" way
that all our .NET projects should implement storing/using config settings. I
like the ability via CMAB to provide a single SQL storage facililty, and a
single method for reading/writing those settings.
But let's consider a specific config setting for a database DSN called
"MarketingDSN".
Since we have multiple environments, I would have a separate config database
for each one...we don't want to be sharing resources across environements.
So, in this central config db, I would have our MarketingDSN config setting.
all Developers would use the CMAB, and would know the MarketingDSN setting
is defined and can be used in that environemnt, so they don't need to create
that setting themselves.
In their code, they would have ConfigurationManager code like this:
string marketingdsn = (string)ConfigurationManager.Items["MarketingDSN"])
Now, by default, we would want this to read from the central config db.
However, let's say the developer, on his local box needs to change that
setting for some testing to a "testing" marketingDSN. We don't want him to
change the central setting...other's would be using it. Instead, it would be
great if , in his web.config, if he created an appsetting called
"MarketingDSN", this value would be used. So the CMAB would look locally,
and if the value was there, use that one, otherwise, use the central one.
Does that help? I'm assuming very possible with some small tweaks to the
CMAB.
Thanks again,
Mike
> Hello Mike,
>
[quoted text clipped - 25 lines]
> Get Secure! ?C www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] - 27 Feb 2004 03:00 GMT
Hi Mike,
Surely it can be done by customizing CMAB. However, I think we could define
a Macro in the code behind. And write two code block to read setttings from
different sources. Just like in C++,
#ifdef _USELOCALSETTING
......
#elseif
.....
#endif
So we can easily change config setting source from local to central place
by defining this Macro in project. It should be a much easier way to
achieve what you need.
Does that answer your question? :)
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ?C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.