首页 新闻 会员 周边 捐助

Silverlight+WCF保存二进制图片到数据大小受了限制

0
悬赏园豆:15 [已解决问题] 解决于 2013-04-18 16:07

Silverlight+WCF保存二进制图片到数据大小受了限制,只能保存10KB以下的图片,10KB以上的就报错了,我请问下,silverlight+wcf在保存图片的时候有限制吗,怎样把大点的图片呢?

月光星辰的主页 月光星辰 | 初学一级 | 园豆:163
提问于:2013-04-09 11:22
< >
分享
最佳答案
0

改配置

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Upload">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
          <serviceTimeouts transactionTimeout="00:10:00" />
          <serviceThrottling maxConcurrentCalls="1024" maxConcurrentSessions="1024"
      maxConcurrentInstances="1024" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="" behaviorConfiguration="Upload" >
        <!--注1:此处的contract值不能随便修改,命名格式为:完全命名空间+接口名 -->
        <!--注2:此处的bindingConfiguration值要与binding中的name值对应-->
        <endpoint contract="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUploadService" address="" >
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IUploadService" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00">
          <readerQuotas   maxArrayLength="2147483647" maxStringContentLength="2147483647"  />
          <!--1024576 为 1024KB-->
          <security mode="None" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
  </system.serviceModel>
收获园豆:15
geass.. | 小虾三级 |园豆:1821 | 2013-04-09 15:22

我的配置文件和你的一样啊

月光星辰 | 园豆:163 (初学一级) | 2013-04-17 19:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册