Hi,
We are using app fabric cache and it works great with the values in web.config.
I want to change the settting after reading from service config. I thought of putting some code in role start up which reads from service config and updates the values
in web.config something like this:
using (var server =
new ServerManager())
{
// get the site's web configuration
var siteNameFromServiceModel =
"Web"; //this is from from service def
var siteName =
string.Format("{0}_{1}",
RoleEnvironment.CurrentRoleInstance.Id, siteNameFromServiceModel);
var siteConfig = server.Sites[siteName].GetWebConfiguration();
//var appSettings = siteConfig.GetSection("dataCacheClient").GetCollection();
// var section = siteConfig.GetSection("configuration/dataCacheClient");
//update the values somehow
server.CommitChanges();
}
I get the following error when I try to read the datacacheclient section which is d
Error: The configuration section 'dataCacheClient' cannot be read because it is missing schema.
Has someone done anything similar? Or is there any other way to handle it. I want to change it because this setting would be different from dev/test/uat/prod…
Any pointers?
Manish