问题描述
App.config:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_Authentication" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassproxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" useDefaultWebProxy="true" />
<binding name="BasicHttpBinding_Collaboration" />
<binding name="BasicHttpBinding_DocumentManagement" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="2:10:00" allowCookies="false" bypassproxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true" />
<binding name="BasicHttpBinding_MemberService" />
<binding name="BasicHttpBinding_WorkflowService" />
<binding name="BasicHttpBinding_ContentService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="2:10:00" allowCookies="false" bypassproxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483648" useDefaultWebProxy="true" transferMode="Streamed" messageEncoding="Mtom" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/DocumentManagement.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_DocumentManagement" contract="CWS.DocumentManagement" name="BasicHttpBinding_DocumentManagement" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/Authentication.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Authentication" contract="CWS.Authentication" name="BasicHttpBinding_Authentication" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/Collaboration.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Collaboration" contract="CWS.Collaboration" name="BasicHttpBinding_Collaboration" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/ContentService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ContentService" contract="CWS.ContentService" name="BasicHttpBinding_ContentService" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/MemberService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_MemberService" contract="CWS.MemberService" name="BasicHttpBinding_MemberService" />
</client>
</system.serviceModel>
使用的服务是“BasicHttpBinding_DocumentManagement”。
folderResult = documentManagementClient.CreateFolder(ref oAuth,Convert.ToString(filteredDataTable.Rows[i]["cmthistory"]) == "C" ? parentId :
subFolderId,folderName,docType != "Correspondence" ?
filteredDataTable.Rows[i]["DocTitle"].ToString() : filteredDataTable.Rows[i]["corressubject"].ToString(),folderMetadata);
执行上述步骤时抛出以下错误
反序列化操作“CreateFolder”的请求消息正文时出错。
格式化程序在尝试反序列化消息时抛出异常: 反序列化操作“AddArticle”的请求消息正文时出错。 已超出最大字符串内容长度配额 (8192),同时 读取 XML 数据。此配额可以通过更改 XmlDictionaryReaderQuotas 对象上的 MaxStringContentLength 属性 在创建 XML 阅读器时使用。 第 60 行,位置 267。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)