我需要向WCF服务器传一组数组 方法如下:IMSICallbackClient AC = new IMSICallbackClient();
AC.insertMrCoordinate(_imsiInfo.ToArray());然后就出现了标题 的错误.Web.config设置如下:
<binding name="NetTcpBinding_IIMSICallback" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="524288" maxBufferSize="1073741824" maxConnections="10"
maxReceivedMessageSize="1073741824">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384000"
maxBytesPerRead="4096000" maxNameTableCharCount="16384000" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
<endpoint address="net.tcp://localhost:9085/IMSICallbackService"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IIMSICallback" behaviorConfiguration="ImsiCallBackbehavior"
contract="IMSICallbackService.IIMSICallback" name="NetTcpBinding_IIMSICallback">
<identity>
<userPrincipalName value="LVHUIJIE\Admin" />
</identity>
</endpoint>
希望各位达人不吝赐教,谢谢.
AC.insertMrCoordinate(_imsiInfo.ToArray());然后就出现了标题 的错误.Web.config设置如下:
<binding name="NetTcpBinding_IIMSICallback" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="524288" maxBufferSize="1073741824" maxConnections="10"
maxReceivedMessageSize="1073741824">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384000"
maxBytesPerRead="4096000" maxNameTableCharCount="16384000" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
<endpoint address="net.tcp://localhost:9085/IMSICallbackService"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IIMSICallback" behaviorConfiguration="ImsiCallBackbehavior"
contract="IMSICallbackService.IIMSICallback" name="NetTcpBinding_IIMSICallback">
<identity>
<userPrincipalName value="LVHUIJIE\Admin" />
</identity>
</endpoint>
希望各位达人不吝赐教,谢谢.
.....
<behaviors>
<serviceBehaviors>
<behavior name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
.....
</system.serviceModel>
我在客户端的Behaviors 是这样设置的
<behaviors>
<endpointBehaviors>
<behavior name="ImsiCallBackbehavior" >
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
可是不行
一定要用<serviceBehaviors>吗