<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>131075</EventID><Type>3</Type><SubType Name="Error">0</SubType><Level>2</Level><TimeCreated SystemTime="2013-04-27T01:26:30.4812396Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /><Execution ProcessName="RelayServer" ProcessID="5316" ThreadID="3" /><Channel/><Computer>RAINY</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/zh-CN/library/System.ServiceModel.Diagnostics.ThrowingException.aspx</TraceIdentifier><Description>正在引发异常。</Description><AppDomain>RelayServer.exe</AppDomain><Exception><ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。</Message><StackTrace> 在 System.ServiceModel.Channels.ClientDuplexConnectionReader.DecodeMessage(Byte[] buffer, Int32&amp; offset, Int32&amp; size, Boolean&amp; isAtEOF, TimeSpan timeout)
------------------------------------------------------------------- 配置如下:
<services>
<!--name - 提供服务的类名-->
<!--behaviorConfiguration - 指定相关的行为配置-->
<service name="RelayServer.Relay" behaviorConfiguration="BindingBehavior">
<!--address - 服务地址-->
<!--binding - 通信方式-->
<!--contract - 服务契约-->
<!--<endpoint binding="basicHttpBinding" contract="WCF.ServiceLib.Binding.IHello" address="Hello" />-->
<endpoint binding="wsHttpBinding" bindingConfiguration="NoneSecurity" contract="WCF.RelayLib.Binding.IRelay" address="Relay"/>
<!--元数据交换的endpoint-->
<!--注:address是mex,它会和host/baseAddresses节点中的baseAddress做拼接,即提供元数据交换的地址为:http://localhost:12345/Binding/mex-->
<!--<endpoint binding="mexHttpBinding" contract="IMetadataExchange" address="mex" />-->
<host>
<baseAddresses>
<add baseAddress="http://localhost:54322/Binding/"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="NoneSecurity" maxReceivedMessageSize="2147483647" receiveTimeout="12:00:00" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="2147483647" />
<reliableSession inactivityTimeout="12:00:00"/>
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>