根据MSDN 这里和这里,下列app.config条目是有效的:
<defaultProxy enabled="false">
<proxy bypassonlocal="true" usesystemdefault="false" />
</defaultProxy>然而,Visual会抱怨我必须为True/False元素编写proxy元素,而false对defaultProxy是正确的
<defaultProxy enabled="false">
<proxy bypassonlocal="True" usesystemdefault="False" />
</defaultProxy>值是否区分大小写?哪一个是对的?
发布于 2013-12-05 14:07:07
旁路本地属性和usesystemdefault属性不映射到布尔配置属性,而是System.Net.Configuration.ProxyElement+BypassOnLocalValues和System.Net.Configuration.ProxyElement+UseSystemDefaultValues枚举的值,这些枚举包括“未指定的”以及"True“和"False”。
另一方面,defaultProxy元素上的已启用属性是布尔值。由于某些原因,xsd模式过于热心,要求小写值,但是任何大小写都会在运行时工作。
在任何情况下,我都会坚持使用什么模式来表示。
https://stackoverflow.com/questions/20401814
复制相似问题