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>
============ 欢迎各位老板打赏~ ===========
与本文相关的文章
- · 阿里云服务器PPTP VPN配置
- · 解决wcf更新不下来代码
- · WIN8/WIN10 IIS8 配置WCF服务
- · WCF:调用方未由服务器进行身份验证
- · Eclipse配置详解,非常全面
- · WCF与WebService的区别
- · 当在MDS Excel中使用“Match Data”功能时发生WCF错误
- · The instance of entity type ‘Customer’ cannot be tracked because another instance with the same key value for {‘Id’} is already being tracked.
- · .NET8实时更新nginx ip地址归属地
- · 解决.NET Blazor子组件不刷新问题
- · .NET8如何在普通类库中引用 Microsoft.AspNetCore
- · .NET8 Mysql SSL error