新建了一个WCF应用程序
服务端配置问价如下:
?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="NoneMessage" maxBufferPoolSize="120000" maxReceivedMessageSize="120000" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="120000" maxArrayLength="120000"/>
<security mode ="None"> </security> </binding> </wsHttpBinding>
</bindings>
<services>
<service name="WcfServiceLibrary1.Service1" behaviorConfiguration="No">
<host>
<baseAddresses>
<add baseAddress="http://192.168.194.85:8002/"/>
</baseAddresses>
</host>
<endpoint address ="" binding ="wsHttpBinding" bindingName ="NoneMessage" contract="WcfServiceLibrary1.IService1">

</endpoint>

</service>
</services>

<behaviors>
<serviceBehaviors>
<behavior name ="No">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>

</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
客户端配置文件如下:<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="NoneMessage_IService1" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="None">
                          </security>
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://192.168.194.85:8002/" binding="wsHttpBinding"
                bindingConfiguration="NoneMessage_IService1" contract="ServiceReference1.IService1"
                name="NoneMessage_IService1">
                <identity>
                    <userPrincipalName value="PC-201007301211\Administrator" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>总是出现异常
未处理的“System.ServiceModel.FaultException”类型的异常出现在 mscorlib.dll 中。其他信息: 无法处理消息。这很可能是因为操作“http://tempuri.org/IService1/BuyTickets”不正确,或因为消息包含无效或过期的安全上下文令牌,或因为绑定之间出现不匹配。如果由于未处于活动状态导致服务中止了该通道,则安全上下文令牌无效。若要防止服务永久中止闲置会话,请增加服务终结点绑定上的接收超时。
怎么改都改不出来,各位大虾帮帮忙,小弟感激不尽