Silverlight关于大数据量存储问题?

dolphin0714 2010-07-13 03:43:39
数据库中有一个字段放超大的文本内容,SL能通过WCF从数据库中读取并显示出来,但想要更新这个超大的文本时就会报maximum string length quota (8192) has been exceeded
请问我应该修改SL的webconfig还是WCF的config,怎么修改啊??

所有方法都试了还是不能保存,只能读取!
...全文
131 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Sunpire 2010-07-14
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 dolphin0714 的回复:]
答案是这样的:
service.name
endpoint.contract
中所指定的名称,要和 .svc 中的 class 全名称 和所要实现的 interface 全名称 完全一致。
[/Quote]

呵呵,LZ在哪复制了我回过的贴子,要给版权费~
dolphin0714 2010-07-14
  • 打赏
  • 举报
回复
答案是这样的:
service.name
endpoint.contract
中所指定的名称,要和 .svc 中的 class 全名称 和所要实现的 interface 全名称 完全一致。
dolphin0714 2010-07-14
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 sunpire 的回复:]
通过代理生成的WCF代理的配置默认都是最大的了,这从 ServiceReferences.ClientConfig 中可以看得到。

而WCF端的则要进行配置,下面给出一个 customBinding 的最大配置

XML code

<binding name="配置名customBinding0">
<binaryMessageEncoding maxReadPoolSize=……
[/Quote]

我现在将WCF端配置成这样,但还是不行,请问错误在哪啊??

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>

<bindings>
<basicHttpBinding>
<binding name="LargeDataTransferServicesBinding" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
<security mode="None" />
</binding>
</basicHttpBinding>

<customBinding>
<binding name="LDcustomBinding">
<binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647"
maxSessionSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binaryMessageEncoding>
<httpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
keepAliveEnabled="true" maxBufferSize="2147483647" transferMode="Streamed" />
</binding>

</customBinding>

</bindings>

<services>
<service name="BSC.DMP.DMPService">
<endpoint address="" binding="customBinding" bindingConfiguration="LDcustomBinding" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>

<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>
dolphin0714 2010-07-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 guoluren_kang 的回复:]
修改接收端的WCF config文件,注意,如果server端接收request超长,则修改server端config,如果是client 接收response超长,则修改client端,建议两边都修改,保持一致。
[/Quote]
我前后都改过很多次了,还是不行!!能指出具体问题所在吗?
在此谢过!
jv9 2010-07-14
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 sunpire 的回复:]
通过代理生成的WCF代理的配置默认都是最大的了,这从 ServiceReferences.ClientConfig 中可以看得到。

而WCF端的则要进行配置,下面给出一个 customBinding 的最大配置

XML code

<binding name="配置名customBinding0">
<binaryMessageEncoding maxReadPoolSize=……
[/Quote]


正解。
Sunpire 2010-07-13
  • 打赏
  • 举报
回复
通过代理生成的WCF代理的配置默认都是最大的了,这从 ServiceReferences.ClientConfig 中可以看得到。

而WCF端的则要进行配置,下面给出一个 customBinding 的最大配置

<binding name="配置名customBinding0">
<binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647"
maxSessionSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binaryMessageEncoding>
<httpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
keepAliveEnabled="true" maxBufferSize="2147483647" transferMode="Streamed" />
</binding>
老Key 2010-07-13
  • 打赏
  • 举报
回复

修改接收端的WCF config文件,注意,如果server端接收request超长,则修改server端config,如果是client 接收response超长,则修改client端,建议两边都修改,保持一致。

8,734

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧