当前位置: 代码迷 >> Web Service >> wcf 访问回来时报错
  详细解决方案

wcf 访问回来时报错

热度:126   发布时间:2012-12-14 10:33:08.0
wcf 访问返回时报错。
服务端配置

 <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <membership defaultProvider="HCCMMembershipProvider">
      <providers>
        <add name="HCCMMembershipProvider" type="HCCM.Security.HCCMMembershipProvider,HCCM.Security" />
      </providers>
    </membership>
  </system.web>
  <system.serviceModel>
    <diagnostics wmiProviderEnabled="true">
      <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
    </diagnostics>
    <bindings>
      <basicHttpBinding>
        <binding name="LargeDataTransferServicesBinding" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" transferMode="Streamed" sendTimeout="00:10:00">
          <readerQuotas maxArrayLength="2147483647" />
        </binding>
      </basicHttpBinding>
      <wsHttpBinding>
        <binding name="DefaultWSHttpBinding" maxBufferPoolSize="2147483647" sendTimeout="00:30:00" receiveTimeout="00:30:00" closeTimeout="00:30:00" openTimeout="00:30:00" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Message">
            <message clientCredentialType="UserName" establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="serviceBehavior" name="HCCM.Service.HCCMManagementService">
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="DefaultWSHttpBinding" 
                  contract="HCCM.Common.Service.Base.IHCCMManagementService" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="UploadWcfService.UpLoadServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
  相关解决方案