Silverlight WCF [英] Silverlight WCF

查看:65
本文介绍了Silverlight WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将图像插入数据库时​​出现上述错误
我的ServiceReference.ClientConfig文件是:

I am getting the above error when trying to insert a image in to database
My ServiceReference.ClientConfig file is :

<binding name="BasicHttpBinding_IPickerWCF" maxBufferSize="2147483647"

     maxReceivedMessageSize="2147483647">
     <security mode="None" />
    </binding>

<endpoint address="http://localhost:3178/ActionsWCF.svc" binding="basicHttpBinding"

    bindingConfiguration="BasicHttpBinding_IActionsWCF" contract="ActionsWCF.IActionsWCF"

    name="BasicHttpBinding_IActionsWCF" />
My WebConfig is
<system.serviceModel>
        <diagnostics performanceCounters="Default">
  <messageLogging logEntireMessage="true" logMalformedMessages="true"

  logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="false"

  maxMessagesToLog="100000" maxSizeOfMessageToLog="2621440" />
 </diagnostics>
 <behaviors>
  <serviceBehaviors>
  <behavior name="WCFServiceBehaviour">
   <serviceMetadata httpGetEnabled="true" />
   <serviceDebug includeExceptionDetailInFaults="true" />
   <dataContractSerializer maxItemsInObjectGraph="2147483647" />
  </behavior>
  </serviceBehaviors>
 </behaviors>
        <!--<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>-->
    </system.serviceModel>


它适用于大小为3kb的图像,但不适用于较大的图像.

请帮帮我.
在此先感谢


It works fine for images of size 3kb but it is not working for larger images.

Please help me.
Thanks in advance

推荐答案

您好,Rajesh,

您必须使用Streaming传输大图片文件.

您可以参考这些文章.
http://msdn.microsoft.com/en-us/library/ms731913.aspx [ ^ ]
Hi Rajesh,

You have to transfer large picture file using Streaming.

You can refer these article.
http://msdn.microsoft.com/en-us/library/ms731913.aspx[^]


这篇关于Silverlight WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆