Hi, I want to have a custom error page for a Sharepoint webapplication. For this i need to edit ApplicationHost.config and web.config changes in about 100+ servers. I need to do following changes to<httpError> nodeunder<system.webServer> node:1. change attribute : lockAttributes="" to lockAttributes="defaultPath"2.Add attribute : errorMode="DetailedLocalOnly". But I am unable to achive it using serverManager and other objects of Microsoft.Web.Administrationas it does not have a method like section.AddAttribute(). Please let me know how this can be achived through code. Also,section.GetAttributeValue("lockAttributes") always throws exception.
Configuration configuration = serverManager.GetApplicationHostConfiguration();
ConfigurationSection section = configuration.GetSection("system.webServer/httpErrors");
var k = section.GetAttributeValue("lockAttributes");