日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
WCF配置文件相關(guān)操作技巧解析

如何運用WCF實現(xiàn)上傳數(shù)據(jù)大小的控制,取決于我們對WCF配置文件的修改方法。在這里就為大家詳細介紹一下WCF配置文件的一些修改技巧,以達到文件大小控制的目的。#t#

創(chuàng)新互聯(lián)是專業(yè)的建平網(wǎng)站建設(shè)公司,建平接單;提供成都網(wǎng)站制作、成都網(wǎng)站建設(shè),網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進行建平網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!

默認情況下,wcf的服務(wù)端如果發(fā)生異常是不會將詳細異常發(fā)送給客戶端的,客戶端只能提到以下籠絡(luò)的提示異常信息:

由于內(nèi)部錯誤,服務(wù)器無法處理該請求。有關(guān)該錯誤的詳細信息,請打開服務(wù)器上的 IncludeExceptionDetailInFaults (從 ServiceBehaviorAttribute 或從 配置行為)以便將異常信息發(fā)送回客戶端,或在打開每個 Microsoft .NET Framework 3.0 SDK 文檔的跟蹤的同時檢查服務(wù)器跟蹤日志。

于是做了一下修改:

  1. [ServiceBehavior(AddressFilterMode
    AddressFilterMode = AddressFilterMode.
    Any, IncludeExceptionDetailInFaults = true)]
  2. public class CommunicationWithUnit : 
    IContractForUnit
  3. {...}

其中第一個是去防火墻的,第二個是客戶端顯示錯誤詳細信息的。

主要還是數(shù)據(jù)大小問題,于是又去解決:

在WCF配置文件進行修改.

舊的WCF配置文件:

 
 
 
  1. < binding name="BasicHttpBinding_
    ICentaMiddleService" closeTimeout="00:01:00"
  2. openTimeout="00:01:00" receiveTimeout=
    "00:10:00" sendTimeout="00:01:00"
  3. allowCookies="false" bypassProxyOnLocal=
    "false" hostNameComparisonMode="StrongWildcard"
  4. maxBufferSize="65536" maxBuffer
    PoolSize="524288" maxReceivedMessageSize="65536"
  5. messageEncoding="Text" textEncoding=
    "utf-8" transferMode="Buffered"
  6. useDefaultWebProxy="true">
  7. < readerQuotas maxDepth="32" 
    maxStringContentLength="8192" 
    maxArrayLength="16384"
  8. maxBytesPerRead="4096" maxName
    TableCharCount="16384" />
  9. < security mode="None">
  10. < transport clientCredentialType=
    "None" proxyCredentialType="None"
  11. realm="" />
  12. < message clientCredentialType=
    "UserName" algorithmSuite="Default" />
  13. < /security>
  14. < /binding>

新的WCF配置文件:

 
 
 
  1. < binding name="BasicHttpBinding_
    ICentaMiddleService" closeTimeout="00:01:00"
  2. openTimeout="00:01:00" receiveTimeout=
    "00:10:00" sendTimeout="00:01:00"
  3. allowCookies="false" bypassProxyOnLocal=
    "false" hostNameComparisonMode="StrongWildcard"
  4. maxBufferSize="65536" maxBufferPoolSize=
    "524288" maxReceivedMessageSize="9223372036854775807"
  5. messageEncoding="Text" textEncoding=
    "utf-8" transferMode="Streamed"
  6. useDefaultWebProxy="true">
  7. < readerQuotas maxDepth="6553500" 
    maxStringContentLength="2147483647"
  8. maxArrayLength="6553500" maxBytesPerRead=
    "6553500" maxNameTableCharCount="6553500" />
  9. < security mode="None">
  10. < transport clientCredentialType="None"
     proxyCredentialType="None"
  11. realm="" />
  12. < message clientCredentialType="UserName" 
    algorithmSuite="Default" />
  13. < /security>
  14. < /binding>

以上就是針對文件上傳大小控制對WCF配置文件進行的修改方法。


分享題目:WCF配置文件相關(guān)操作技巧解析
文章鏈接:http://www.5511xx.com/article/ccoiscg.html