<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      happyhippy

      這個(gè)世界的問題在于聰明人充滿疑惑,而傻子們堅(jiān)信不疑。--羅素

      SilverLight調(diào)用WCF,提交的是一個(gè)List<Linq2SqlEntity>;當(dāng)List中數(shù)據(jù)量不大的時(shí)候,不會(huì)報(bào)錯(cuò);當(dāng)數(shù)據(jù)量稍微大一點(diǎn)兒,就會(huì)出現(xiàn)這個(gè)錯(cuò)誤。發(fā)生了 System.ServiceModel.ProtocolException
        Message=已超過傳入消息(65536)的最大消息大小配額。若要增加配額,請(qǐng)使用相應(yīng)綁定元素上的 MaxReceivedMessageSize 屬性。
        Source=System.ServiceModel
        StackTrace:
        在 System.ServiceModel.Channels.HttpInput.ThrowHttpProtocolException(String message, HttpStatusCode statusCode, String statusDescription)

       

          費(fèi)了牛勁在網(wǎng)上搜了一通,有的說是要修改behavior的maxItemsInObjectGraph,有的說要修改binding的maxBufferSize/maxReceivedMessageSize,有的說要增加readerQuotas,有的是endpoint沒有與自定義binding配置節(jié)關(guān)聯(lián)起來,有的說要客戶端和服務(wù)器端都要改(我的應(yīng)用中,接受數(shù)據(jù)的是服務(wù)器端,客戶端負(fù)責(zé)提交,所以應(yīng)該不關(guān)客戶端的事兒)。。。然后把server端的配置文件調(diào)整成下面這樣:

         1: <system.serviceModel>
         2:   <behaviors>
         3:     <serviceBehaviors>
         4:       <behavior name="MessageHeaderOperationBehaviourAuthenticationBehavior">
         5:         <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
         6:         <serviceMetadata httpGetEnabled="true"/>
         7:         <serviceDebug includeExceptionDetailInFaults="true"/>
         8:       </behavior>
         9:     </serviceBehaviors>
        10:   </behaviors>
        11:   <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
        12:   <services>
        13:     <service behaviorConfiguration="MessageHeaderOperationBehaviourAuthenticationBehavior"
        14:              name="MessageHeaderOperationBehaviourAuthentication">
        15:       <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeSize" contract="DyeService">
        16:       </endpoint>
        17:     </service>
        18:   </services>
        19:   <bindings>
        20:     <basicHttpBinding>
        21:       <binding name="LargeSize"  maxBufferSize="2147483647"
        22:                maxBufferPoolSize="21474836471" maxReceivedMessageSize="2147483647">
        23:         <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
        24:                       maxArrayLength="2147483647" maxBytesPerRead="2147483647"
        25:                       maxNameTableCharCount="2147483647" />
        26:         <security mode="None" />
        27:       </binding>
        28:     </basicHttpBinding>
        29:   </bindings>
        30: </system.serviceModel>

             但是問題依舊。最后在stackoverflow找到了正解:WCF Error - unexpected response: (400) Bad Request.,里面鏈接到了另一篇帖子:Cannot get the MaxReceivedMessageSize higher than (65536)

       

            解決辦法就是:配置文件中,service 的name屬性必須與服務(wù)的類型全名稱保持一致,才能應(yīng)用上自定義的配置節(jié)。

            按著這個(gè)方法,調(diào)整之后的配置文件如下所示(刪掉了其他無關(guān)的maxItemsInObjectGraph、readerQuotas等):

         1:  
         2:   <system.serviceModel>
         3:     <behaviors>
         4:       <serviceBehaviors>
         5:         <behavior name="MessageHeaderOperationBehaviourAuthenticationBehavior">
         6:           <serviceMetadata httpGetEnabled="true"/>
         7:           <serviceDebug includeExceptionDetailInFaults="true"/>
         8:         </behavior>
         9:       </serviceBehaviors>
        10:     </behaviors>
        11:     <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
        12:     <services>
        13:       <service behaviorConfiguration="MessageHeaderOperationBehaviourAuthenticationBehavior"
        14:                name="NameSpace.DyeService">
        15:         <endpoint address="" binding="basicHttpBinding" bindingConfiguration="LargeSize" contract="NameSpace.DyeService">
        16:         </endpoint>
        17:       </service>
        18:     </services>
        19:     <bindings>
        20:       <basicHttpBinding>
        21:         <binding name="LargeSize"  maxBufferSize="2147483647"
        22:                  maxBufferPoolSize="21474836471" maxReceivedMessageSize="2147483647">
        23:         </binding>
        24:       </basicHttpBinding>
        25:     </bindings>
        26:   </system.serviceModel>

       

      posted on 2011-07-02 21:40  Silent Void  閱讀(7178)  評(píng)論(0)    收藏  舉報(bào)

      主站蜘蛛池模板: 亚洲AV福利天堂在线观看| 赣榆县| 欧美熟妇xxxxx欧美老妇不卡| 亚洲另类欧美综合久久图片区| 日本一区二区a√成人片| 2019国产精品青青草原| 亚洲二区中文字幕在线| 日韩精品二区三区四区| 国产精品中文字幕二区| 一面膜上边一面膜下边视频| 天天做天天爱夜夜爽导航| 久久精品免视看国产成人| 久青草国产综合视频在线| 2019国产精品青青草原| 欧美一本大道香蕉综合视频| 午夜通通国产精品福利| 亚洲av色香蕉一二三区| 国产精品自拍一二三四区| 临西县| A级毛片100部免费看| 午夜在线不卡| 色综合天天综合天天综| 人妻少妇精品视频三区二区| 欧美成人www免费全部网站| 狠狠亚洲色一日本高清色| 精品国产精品国产偷麻豆| 亚洲性日韩精品一区二区| 极品蜜桃臀一区二区av| 少妇高潮喷水正在播放 | 亚洲熟妇无码av另类vr影视| 免费看成人毛片无码视频| 欧美喷潮最猛视频| xxxx丰满少妇高潮| 极品蜜桃臀一区二区av| 国产精品中文字幕免费| 欧美 亚洲 中文 国产 综合| 日本大片在线看黄a∨免费| 亚洲乱理伦片在线观看中字| 武胜县| 毛片内射久久久一区| 亚洲激情国产一区二区三区|