C# 对WCF的调用返回的请求实体太大
我知道这已经被问了好几次了,但我一直遵循给定的解决方案,仍然得到了错误 我有一个WCF Web服务库、一个WCF Web服务主机应用程序和一个使用这些服务的Windows窗体应用程序 表单应用程序具有此app.Config…的主机应用程序的服务引用C# 对WCF的调用返回的请求实体太大,c#,wcf,web-services,entity-framework,wcf-binding,C#,Wcf,Web Services,Entity Framework,Wcf Binding,我知道这已经被问了好几次了,但我一直遵循给定的解决方案,仍然得到了错误 我有一个WCF Web服务库、一个WCF Web服务主机应用程序和一个使用这些服务的Windows窗体应用程序 表单应用程序具有此app.Config…的主机应用程序的服务引用 <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BWData" max
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BWData" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:58045/BWService.svc/bwd"
binding="basicHttpBinding" bindingConfiguration="BWData" contract="BWServiceReference.IBws"
name="BWData" />
</client>
</system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BWSBinding" openTimeout="00:10:00" maxBufferPoolSize="2147483646"
maxBufferSize="2147483646" maxReceivedMessageSize="2147483646">
<readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646"
maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MyApp.Business.WebServices.Bws">
<endpoint address="bwd" binding="basicHttpBinding" bindingConfiguration="BWSBinding"
name="BWData" contract="MyApp.Business.WebServices.IBws" />
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
</service>
</services>
主机应用程序Web.Config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BWData" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:58045/BWService.svc/bwd"
binding="basicHttpBinding" bindingConfiguration="BWData" contract="BWServiceReference.IBws"
name="BWData" />
</client>
</system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BWSBinding" openTimeout="00:10:00" maxBufferPoolSize="2147483646"
maxBufferSize="2147483646" maxReceivedMessageSize="2147483646">
<readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646"
maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="MyApp.Business.WebServices.Bws">
<endpoint address="bwd" binding="basicHttpBinding" bindingConfiguration="BWSBinding"
name="BWData" contract="MyApp.Business.WebServices.IBws" />
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
</service>
</services>
使用SVC文件
<%@ ServiceHost Language="C#" Debug="true" Service="MyApp.Business.WebServices.Bws" %>
WCF服务库App.Config
<services>
<service name="MyApp.Business.WebServices.Bws">
<endpoint address="" binding="basicHttpBinding" contract="MyApp.Business.WebServices.IBws">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/MyApp.Business.WebServices/Service1/" />
</baseAddresses>
</host>
</service>
</services>
我将一个大的
列表
传递给使用EF向数据库添加记录的Web服务。有人能看到我遗漏了什么吗?试试这个@Aron谢谢,尝试了一下,但还是遇到了同样的问题。首先,服务库的配置文件是不相关的-库将使用托管应用程序的配置文件。其次,您要发送的列表有多大?