62,072
社区成员
发帖
与我相关
我的任务
分享
[OperationContract]
[WebGet]
News[] GetNews(DateTime mdate);
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<!-- 服务集合 -->
<services>
<service behaviorConfiguration="ssBehavior" name="Muchinfo.News.NewsSelectService">
<!--<endpoint address="" behaviorConfiguration="epBehavior"
binding="webHttpBinding" bindingConfiguration="nonSecurityHttp"
contract="Muchinfo.News.SelectContract.INewsSelectService" />-->
<endpoint address="net.tcp://0.0.0.0:8080" behaviorConfiguration="maxSerializeBehavior"
binding="customBinding" bindingConfiguration="compactBinding"
contract="Muchinfo.News.SelectContract.INewsSelectService" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://0.0.0.0:8080/NewsSelectService" />
</baseAddresses>
</host>
</service>
</services>
<!-- 绑定 -->
<bindings>
<netTcpBinding>
<binding name="compactBinding" transferMode="Streamed" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="16384"/>
<security mode="None"></security>
</binding>
</netTcpBinding>
<customBinding>
<binding name="nsWebHttpBinding">
<httpTransport maxBufferPoolSize="6553600" maxReceivedMessageSize="6553600" allowCookies="false" authenticationScheme="Anonymous" maxBufferSize="6553600" />
<webMessageEncoding writeEncoding="utf-8" />
</binding>
<binding name="compactBinding">
<compactMessageEncoding>
<binaryMessageEncoding />
</compactMessageEncoding>
<tcpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxPendingConnections="20" maxPendingAccepts="2" listenBacklog="20">
<connectionPoolSettings maxOutboundConnectionsPerEndpoint="20" />
</tcpTransport>
</binding>
<binding name="compact2Binding">
<compactMessageEncoding>
<textMessageEncoding />
</compactMessageEncoding>
<httpTransport maxBufferPoolSize="6553600" maxReceivedMessageSize="6553600" allowCookies="false" authenticationScheme="Anonymous" maxBufferSize="6553600" />
</binding>
</customBinding>
<webHttpBinding>
<binding name="nonSecurityHttp" allowCookies="false" maxBufferPoolSize="4194304" maxReceivedMessageSize="4194304" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="32767" maxNameTableCharCount="6553600" />
<security mode="None" />
</binding>
</webHttpBinding>
</bindings>
<!-- 行为 -->
<behaviors>
<endpointBehaviors>
<behavior name="maxSerializeBehavior">
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
</behavior>
<behavior name="epBehavior">
<!--<enableWebScript/>-->
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
<webHttp helpEnabled="true" automaticFormatSelectionEnabled="false" defaultOutgoingResponseFormat="Json" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ssBehavior">
<serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="5" />
<!--<serviceMetadata httpGetEnabled="true" httpGetUrl="MEX"/>-->
<serviceTimeouts transactionTimeout="00:05:00" />
<serviceDebug includeExceptionDetailInFaults="false" />
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="compactBinding">
<compactMessageEncoding>
<binaryMessageEncoding/>
</compactMessageEncoding>
<tcpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxPendingConnections="20" maxPendingAccepts="2" listenBacklog="20">
<connectionPoolSettings maxOutboundConnectionsPerEndpoint="20"/>
</tcpTransport>
</binding>
</customBinding>
<wsHttpBinding>
<binding name="nonSecurityHttp" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true" allowCookies="false">
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"/>
</security>
</binding>
<binding name="HstoryServices" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true"/>
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="false"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="Behaviors.EndpointBehaviors">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<!--@20130902 -->
<endpoint address="net.tcp://127.0.0.1:8080" binding="customBinding" name="SelectNews"
bindingConfiguration="compactBinding" contract="Muchinfo.News.SelectContract.INewsSelectService"
behaviorConfiguration="Behaviors.EndpointBehaviors"/>
</client>
</system.serviceModel>