locked
Need help reading trace RRS feed

  • Question

  • Hello Im having trouble with a WCF setup behaving differently when running on a server from running on localhost.

     

    I have a web application (localhost) that is a WCF-client that communicates with a WCF-service (proxy) on a remote server which relays the traffic to another WCF-service located on the same machine.

    When running it everything works as expected, but when a publish my client web application to a server it stops working. I dont get any exception, just null results back.

     

    When I trace the traffic i notice that when running it from my localhost it gets the configuration section, channelendpointelement and so on. But when I´m running it from the server it never does, and therefore never reaches the WCF-service.

     

    All servers including my localhost are in the same domain.

     

    I´m really stuck here and hope someone could point me in the right direction. Thank you!

    Below are snippets from my attempts in tracing this...

     

    Snippet from trace in proxy when running locally:

    ==========================================

    Opening System.ServiceModel.InstanceContext/45553369
    Opened System.ServiceModel.InstanceContext/45553369
    A message was read
    Starting ReadObject
    Finished ReadObject
    ...
    Starting ReadObject
    Finished ReadObject
    Get configuration section.
    Get ChannelEndpointElement.
    Get configured binding.
    Get machine.config common behaviours.
    Opening System.ServiceModel.ChannelFactory...
    Opening System.ServiceModel.Channels.ServiceChannelFactory...
    ...
    Opened System.ServiceModel.Channels.ServiceChannel/14073325
    A message was written
    Starting WriteObject
    Finished WriteObject
    ...
    Starting WriteObject
    Finished WriteObject
    Message Log Trace
    Sent a message over a channel.
    HTTP response was recieved
    Recieved a message over a channel.
    Message not logged because its size exceeds configured quota
    Recieved reply over request channel
    A message was read
    Starting ReadObject
    Finished ReadObject
    A message was closed
    A message was closed
    A message was written
    Starting WriteObject
    Finished WriteObject
    Message not logged because its size exceeds configured quota
    Sent a message over a channel.
    A message was closed
    A message was closed
    Closing System.ServiceModel.InstanceContext/45553369
    Closed System.ServiceModel.InstanceContext/45553369

     

    Snippet from trace in proxy when running from server.

    ===========================================

    Opening System.ServiceModel.InstanceContext/5626689
    Opened System.ServiceModel.InstanceContext/5626689
    A message was read
    Starting ReadObject
    Finished ReadObject
    ...
    Starting ReadObject
    Finished ReadObject
    A message was written
    Starting WriteObject
    Finished WriteObject
    Message Log Trace
    Sent message over a channel
    A message was closed
    A message was closed
    Closing System.ServiceModel.InstanceContext/5626689
    Closed System.ServiceModel.InstanceContext/5626689

    Thursday, September 20, 2007 11:14 AM

Answers

  • Do you mean you host the client (Localhost) on Win XP IIS 5.1 (as a web service)?

    Note that the service activation on IIS is lazy mode. That is IIS waits for the arrival of first request before activating the correspond service.  

     

    Monday, September 24, 2007 7:02 PM

All replies

  • Could you please tell me what the hosting environment is for each entity (e.g., client, forwarder and end service)?

     

    Friday, September 21, 2007 10:06 PM
  • Localhost runs on Win XP IIS 5.1 and all the others run on Win 2003 IIS 6.

    Here are the config-files of the client and the proxy...dont know if its of any help.

     

    Code Snippet

    <system.serviceModel>

    <bindings>

    <basicHttpBinding>

    <binding name="BasicHttpBinding_IBookmakerProxy" closeTimeout="00:01:00"

    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"

    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

    maxBufferSize="50000000" maxBufferPoolSize="524288" maxReceivedMessageSize="50000000"

    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"

    useDefaultWebProxy="true">

    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

    maxBytesPerRead="4096" maxNameTableCharCount="16384" />

    <security mode="TransportCredentialOnly">

    <transport clientCredentialType="Ntlm" />

    </< FONT>security>

    </< FONT>binding>

    </< FONT>basicHttpBinding>

    </< FONT>bindings>

    <client>

    <endpoint address="http://devwcf.xxx.net/BookMaker/BookMakerService.svc"

    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBookmakerProxy"

    contract="xxx.Internet.CarsNew.Communication.BookMakerReference.IBookmakerProxy"

    name="BasicHttpBinding_IBookmakerProxy" />

    </< FONT>client>

    </< FONT>system.serviceModel>

     

     

    Proxy.

    Code Snippet

    <system.serviceModel>

    <services>

    <service name="xxx.WCF.Services.BookMaker.BookMakerService" behaviorConfiguration="MyServiceTypeBehaviors">

    <endpoint contract="xxx.Services.BookMaker.IBookmakerProxy" binding="basicHttpBinding"/>

    </service>

    </services>

    <behaviors>

    <serviceBehaviors>

    <behavior name="MyServiceTypeBehaviors">

    <serviceMetadata httpGetEnabled="true"/>

    <serviceDebug includeExceptionDetailInFaults="true"/>

    </behavior>

    </serviceBehaviors>

    </behaviors>

    <bindings>

    <basicHttpBinding>

    <binding name="BasicHttpBinding_IBookmakerProxy" closeTimeout="00:01:00"

    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"

    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

    maxBufferSize="50000000" maxBufferPoolSize="524288" maxReceivedMessageSize="50000000"

    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"

    useDefaultWebProxy="true">

    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"

    maxBytesPerRead="4096" maxNameTableCharCount="16384" />

    <security mode="TransportCredentialOnly">

    <transport clientCredentialType="Ntlm" />

    </security>

    </binding>

    </basicHttpBinding>

    </bindings>

    <client>

    <endpoint name="BookMakerExternalBooking"

    binding="basicHttpBinding"

    address="http://stagedp.xxx.net/bookmaker/externalaccess.svc"

    contract="xxx.Services.BookMaker.IBookmakerService"

    bindingConfiguration="BasicHttpBinding_IBookmakerProxy"/>

    </client>

    </system.serviceModel>

     

     

     

    Saturday, September 22, 2007 7:17 PM
  • Do you mean you host the client (Localhost) on Win XP IIS 5.1 (as a web service)?

    Note that the service activation on IIS is lazy mode. That is IIS waits for the arrival of first request before activating the correspond service.  

     

    Monday, September 24, 2007 7:02 PM