sectionSchema>
</configSchema>
Then added a following line into IIS applicationHost.config file:
<section
name="RegistriesCustomSettings"
overrideModeDefault="Allow"
allowDefinition="Everywhere"
/>
When I go to the site under IIS and try to edit section values using IIS Configuration Editor, I get an error from Configuration Editor with no description.
If I remove the section declaration from site web.config file then error disappears and I can edit values in config section, but site site no longer rendering giving configuration error.
It seems ASP.NET doesn't detect it as a valid section. Could you please try either of the following options to see if this address the issue:
• When configure the settings in Configuration Editor, click the "From" dropdown list, select ApplicationHost.config with location path of your site.
• Define the section under system.webServer node.
VictorNow
4 Posts
Editing custom configSection using IIS Configuration Editor
May 06, 2011 10:18 PM|LINK
I have a following section in my app web.config file:
<sectionGroup name="RegistriesCustomSettings">
<section name="RegistriesSettings"
type="Registries.Business.Utilities.RegistriesConfigurations"/>
</sectionGroup >
<RegistriesCustomSettings>
<RegistriesSettings ContextCommandTimeout="30"
logLinq="true" DisplayUser="true" BaseReportPath="/DDD/"
ReportingServer="http://ReportServer"
TopInstitution="1000001" />
</RegistriesCustomSettings>
I also created a new file and added it into IIS schema folder with a following content:
<
configSchema> <sectionSchema name="RegistriesCustomSettings"><
element name="RegistriesSettings"> <attribute name="ContextCommandTimeout" type="int" validationType="integerRange" validationParameter="30,600"allowInfinite="false" defaultValue="30" /><
attribute name="logLinq" type="bool" defaultValue="false" /> <attribute name="DisplayUser" type="bool" defaultValue="true" /><
attribute name="BaseReportPath" type="string" validationType="nonEmptyString" /> <attribute name="ReportingServer" type="string" validationType="nonEmptyString" /><
attribute name="TopInstitution" type="string" defaultValue = "1000001" validationType="nonEmptyString"/> </element></
sectionSchema> </configSchema> Then added a following line into IIS applicationHost.config file: <section name="RegistriesCustomSettings" overrideModeDefault="Allow" allowDefinition="Everywhere" /> When I go to the site under IIS and try to edit section values using IIS Configuration Editor, I get an error from Configuration Editor with no description.If I remove the section declaration from site web.config file then error disappears and I can edit values in config section, but site site no longer rendering giving configuration error.
How can I resolve this problem?
IIS7 - General cofiguration
Lloydz
2335 Posts
Microsoft
Re: Editing custom configSection using IIS Configuration Editor
May 11, 2011 07:11 AM|LINK
Hi,
It seems ASP.NET doesn't detect it as a valid section. Could you please try either of the following options to see if this address the issue:
• When configure the settings in Configuration Editor, click the "From" dropdown list, select ApplicationHost.config with location path of your site.
• Define the section under system.webServer node.
Hope this helps, thanks.