【发布时间】:2015-01-11 14:07:49
【问题描述】:
我最近对 wcf REST 服务的 web.config 文件进行了更改,我刚刚向其中添加了 maxBufferSize="10485760" 属性。请在下面找到代码段...
<wsHttpBinding>
<binding name="WSHttpBinding_IService" closeTimeout="00:04:00"
openTimeout="00:04:00" receiveTimeout="00:04:00" sendTimeout="00:04:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode=
"StrongWildcard" maxBufferSize="10485760" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:04:00" enabled="false" />
</binding>
</wsHttpBinding>
进行该更改后,应用程序无法运行,它正在引发以下异常。
配置错误描述:在处理服务此请求所需的配置文件期间发生错误。 请查看下面的具体错误详细信息并修改您的 适当的配置文件。解析器错误消息:无法识别 属性'maxBufferSize'。请注意,属性名称是 区分大小写。
如果有人能在这方面提供帮助,那就太好了。
【问题讨论】:
标签: c# wcf rest web-config service-model