WindowsMobile中使用WCF,当WCF中返回1个400行的DataTable时,返回为空,当小于400行时可以返回?
是WCF配置文件的问题吗?配置文件如下<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="false" /> <!--将上传文档的大小控制在20M以内-->
<httpRuntime executionTimeout="3000" maxRequestLength="204800" useFullyQualifiedRedirectUrl="false" />
</system.web> <!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。-->
<system.serviceModel>
<services>
<service name="WcfServiceLibrary1.Service1" behaviorConfiguration="WcfServiceLibrary1.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
</baseAddresses>
</host>
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="mybasicHttpBinding" contract="WcfServiceLibrary1.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfServiceLibrary1.Service1Behavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors> <bindings>
<basicHttpBinding>
<binding name="mybasicHttpBinding" sendTimeout="00:10:00" maxBufferSize="655360000"
maxBufferPoolSize="655360000" maxReceivedMessageSize="655360000"
messageEncoding="Text">
<readerQuotas maxDepth="320" maxStringContentLength="655360000"
maxArrayLength="655360000" maxBytesPerRead="65536" maxNameTableCharCount="655360000" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
是WCF配置文件的问题吗?配置文件如下<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="false" /> <!--将上传文档的大小控制在20M以内-->
<httpRuntime executionTimeout="3000" maxRequestLength="204800" useFullyQualifiedRedirectUrl="false" />
</system.web> <!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。-->
<system.serviceModel>
<services>
<service name="WcfServiceLibrary1.Service1" behaviorConfiguration="WcfServiceLibrary1.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
</baseAddresses>
</host>
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="mybasicHttpBinding" contract="WcfServiceLibrary1.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfServiceLibrary1.Service1Behavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors> <bindings>
<basicHttpBinding>
<binding name="mybasicHttpBinding" sendTimeout="00:10:00" maxBufferSize="655360000"
maxBufferPoolSize="655360000" maxReceivedMessageSize="655360000"
messageEncoding="Text">
<readerQuotas maxDepth="320" maxStringContentLength="655360000"
maxArrayLength="655360000" maxBytesPerRead="65536" maxNameTableCharCount="655360000" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
<behaviors>
<endpointBehaviors>
<behavior name="ServiceViewEventBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
<configuration>
<system.web>
<compilation debug="false" /> <!--将上传文档的大小控制在20M以内-->
<httpRuntime executionTimeout="3000" maxRequestLength="204800" useFullyQualifiedRedirectUrl="false" />
</system.web> <!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。-->
<system.serviceModel>
<services>
<service name="WcfServiceLibrary1.Service1" behaviorConfiguration="WcfServiceLibrary1.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
</baseAddresses>
</host>
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="mybasicHttpBinding" contract="WcfServiceLibrary1.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfServiceLibrary1.Service1Behavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors><behaviors>
<endpointBehaviors>
<behavior name="ServiceViewEventBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
</behaviors> <bindings>
<basicHttpBinding>
<binding name="mybasicHttpBinding" sendTimeout="00:10:00" maxBufferSize="655360000"
maxBufferPoolSize="655360000" maxReceivedMessageSize="655360000"
messageEncoding="Text">
<readerQuotas maxDepth="320" maxStringContentLength="655360000"
maxArrayLength="655360000" maxBytesPerRead="65536" maxNameTableCharCount="655360000" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="false" /> <!--将上传文档的大小控制在20M以内-->
<httpRuntime executionTimeout="3000" maxRequestLength="204800" useFullyQualifiedRedirectUrl="false" />
</system.web> <!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。-->
<system.serviceModel>
<services>
<service name="WcfServiceLibrary1.Service1" behaviorConfiguration="WcfServiceLibrary1.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" />
</baseAddresses>
</host>
<endpoint address="basic" binding="basicHttpBinding" bindingConfiguration="mybasicHttpBinding" contract="WcfServiceLibrary1.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WcfServiceLibrary1.Service1Behavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors> <bindings>
<basicHttpBinding>
<binding name="mybasicHttpBinding" sendTimeout="00:10:00" maxBufferSize="655360000"
maxBufferPoolSize="655360000" maxReceivedMessageSize="655360000"
messageEncoding="Text">
<readerQuotas maxDepth="320" maxStringContentLength="655360000"
maxArrayLength="655360000" maxBytesPerRead="65536" maxNameTableCharCount="655360000" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="ServiceViewEventBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
windows Mobile 客户端怎么配置web.config