[英]Practicing web.config and getting error
我从这里练习web.config
文件
当我复制并粘贴以下代码时 :
<configSections>
<section name ="ProductSection" type ="<ProductSection" />
</configSections>
<ProductSection>
<gridSettings title ="Latest Products" count ="20"></gridSettings>
<color background="FFFFCC" foreground="FFFFFF"></color>
</ProductSection>
我遇到了一些错误,例如:
</section>
丢失。 'section'
不能包含子元素。 如何清除这些错误并使其平稳运行。
代替
<section name ="ProductSection" type ="<ProductSection" />
尝试
<section name ="ProductSection" type ="<ProductSection" />
你有这个:
type ="<ProductSection"
这在XML中无效,请删除“ <”字符:
<section name ="ProductSection" type ="ProductSection" />
如果实际上带有“ <”的内容,则必须像这样编码:
<section name ="ProductSection" type ="<ProductSection" />
但是,由于实际部分是<ProductSection>
,因此可能只是您这边的错字。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.