0
Reply

WCF - SvcTraceViewer: "The body of the message cannot be read because it is empty."

devvvy

devvvy

Mar 3 2009 4:43 AM
8.7k
hello

I have a service that do this:
    public bool AuthenticateUser(string strUserName, int nPasswordHash)

It's called from ASP.NET login page. Executed the code with debugger running on Visual Studio and NO exception reported/detected. However when I view with "SvcTraceViewer", I keep seeing:

   "The body of the message cannot be read because it is empty."

Here's web.config of web service exposing authentication service:

<?xml version="1.0"?>
... more ...
    <system.serviceModel>
        <diagnostics>
   <messageLogging logEntireMessage="true" logMalformedMessages="true"
    logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
  </diagnostics>
  <services>
   <service behaviorConfiguration="ServiceBehavior" name="xxxxx.SecurityServiceLib.SecurityService">
    
         <endpoint address=""
        binding="basicHttpBinding"
        bindingConfiguration=""
        name="Basic"
        contract="xxxxx.SecurityServiceLib.ISecurityService">
        </endpoint>
        
    <endpoint  address="MEX"
        binding="mexHttpBinding"
        name="MEX"
        contract="IMetadataExchange" />
        
    <host>
     <baseAddresses>
                <add baseAddress="http://localhost:18000/SecurityServiceWeb/" />
     </baseAddresses>
     <timeouts closeTimeout="00:01:10" />
    </host>
   </service>
  </services>
        <behaviors>
   <serviceBehaviors>
    <behavior name="ServiceBehavior">
     <serviceMetadata httpGetEnabled="true" httpGetUrl="" />
     <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
   </serviceBehaviors>
  </behaviors>
    </system.serviceModel>
... more ...
</configuration>

Any idea? I been banging my head against the wall because of this for sometime and still bit stuck.

dev