Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All.

My first ever question here.
I wrote a WCF REST Based service and now am trying to test it through WCF Test Client. There's a ValidateLogin() method which I am trying to test and as I provide the inputs and click 'Invoke', I am provided with the message::

Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client side configuration does not match the proxy; the existing proxy is invalid

The strangest part about this is, it's not happening everytime. Yes, sometimes the client is indeed working and giving me the outputs in the output pane. But more often it's the error message that's coming up.

here's a stub from my web config.
XML
<system.serviceModel>
      <services>
        <service name="FitInfinity.FinFServiceApp" behaviorConfiguration="MyServiceTypeBehaviors" >
          <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
          <endpoint address="FinFServiceApp.svc" binding="wsHttpBinding" contract="FitInfinity.IFinFServiceApp"></endpoint>
        </service>
      </services>


      <behaviors>
        <serviceBehaviors>
          <behavior name="MyServiceTypeBehaviors" >
            <serviceMetadata httpGetEnabled="true" />
          </behavior>
        </serviceBehaviors>
        
      </behaviors>
    </system.serviceModel>



I had previously hosted it all on my IIS so that when I type the URL like this http://www.fitinfinity.in/FinFServiceApp.svc[^]
my service page loads without any problem. Here www.fitinfinity.in is the name of the domain I configured on my IIS for my application. It is IIS 6.1.
Can you tell me why is this sporadic erroneous behaviour happening? What I need to edit/modify to correct it. When this would work fine without and glitch I actually want to consume it then into my main asp.net application. Send requests to it through jQuery Ajax and receive data to process it.

Look forward to all the valuable, helpful assistance from the codeproject community.

Thanks to All in advance,
In anticipation of valuable technical guidance.

What I have tried:

Google search, trying to decode/debug on my own
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900