zoukankan      html  css  js  c++  java
  • silverlight+wcf上传大文件 配置

    服务器端:web.config

    <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ExcelServer.Service1Behavior"><!--name=命名空间(ExcelServer)+类名(Server1)+Bheavior-->
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
            </behavior>
       
          </serviceBehaviors>
        </behaviors>
        <services>
          <service behaviorConfiguration="ExcelServer.Service1Behavior" name="ExcelServer.Service1"><!--name=命名空间(ExcelServer)+类名(Server1)-->

            <endpoint address="" bindingConfiguration="LargeBuffer" binding="basicHttpBinding" contract="ExcelServer.IService1"/>

    <!--name=命名空间(ExcelServer)+接口(IServer1)-->


          </service>
        </services>
        <bindings>
          <basicHttpBinding>
            <binding name="LargeBuffer" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"><!--name=随意命名-->
              <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647"/>
              <security mode="None"></security>
            </binding>
          </basicHttpBinding>
        </bindings>
      </system.serviceModel>
     <system.webServer>
      
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>

    客户端:ServiceReferences.ClientConfig

    <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <binding name="BasicHttpBinding_IService11" maxBufferSize="2147483647"
                        maxReceivedMessageSize="2147483647">
                        <security mode="None" />
                    </binding>
                </basicHttpBinding>
                <customBinding>
                         <binding name="BasicHttpBinding_IService1">
                        <textMessageEncoding messageVersion="Default" writeEncoding="utf-8" />
                        <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
                    </binding>
                </customBinding>
            </bindings>
            <client>
                           <endpoint address="http://localhost:44121/Service1.svc" binding="basicHttpBinding"
                    bindingConfiguration="BasicHttpBinding_IService11" contract="localService.IService1"
                    name="BasicHttpBinding_IService1" />
            </client>
        </system.serviceModel>

  • 相关阅读:
    [Qt] 文本文件读写, 摘自官方文档
    [Windows] Socket Server Failed to bind, error 10048
    lodctr /R 失败的情况
    ModuleNotFoundError: No module named 'sklearn.cross_validation'
    [Qt] 通过socket将另一个程序的某个窗口调到最前端
    SortedDictionary<TKey, TValue> 类 表示根据键进行排序的键/值对的集合。
    finally不管有没有错都会运行 finally 块用于清除 try 块中分配的任何资源,以及运行任何即使在发生异常时也必须执行的代码
    HttpWebRequest使用证书请求
    string StartsWith 方法 Https
    设置https验证方式
  • 原文地址:https://www.cnblogs.com/suzh/p/2077578.html
Copyright © 2011-2022 走看看