Microsoft WCF Test Client failure to add a service

Asked By 20 points N/A Posted on -
qa-featured

Hello experts,

An application is functioning properly when I tested it using Microsoft WCF Test Client.

However, when the WCF HTTP Activation is unavailable, this error message occurred:

What will I do when I encounter this problem again?

Any help is highly appreciated.

Thanks!

Error:

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.
Error Details


Error: cannot obtain Metadata from http:127.0.0.1:81/Service1.svc? wsdi f this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/publishing-metadata.

SHARE
Best Answer by Edwon Redrikk
Answered By 5 points N/A #108864

Microsoft WCF Test Client failure to add a service

qa-featured

Good day Herbert, the solution to this problem is;

Check your web service for any errors to prevent instances of the errors happening again.

The web service should be exposing metadata in the following format;

<behaviors>

        <service Behaviors>

           <behavior name=Mybehavior>

             <serviceMetadata httpGetEnabled="True" />
          </behavior>
         </serviceBehaviors>
</behaviors>
And your service would be using behaviorConfiguration="myBehavior"

With this format of the metadata and a fresh proxy of the web service, the error should be solved since the conflicts will  be eliminated. Thanks

Best Answer
Best Answer
Answered By 5 points N/A #108866

Microsoft WCF Test Client failure to add a service

qa-featured

Hi Herbert,

Your problem stated here is easy to solve because it has been experienced formerly and solved. Here are the things you need to do for your software to work well;

  • Ensure you maintain your web browser up to date by installing the latest updates and web browser.
  • Ensure the proxy is well arranged and defined
  • Your proxy should have the following metadata;

      <behaviors>
            <serviceBehaviors>
                <behavior name="myBevaior">
                    <serviceMetadata httpGetEnabled="True" />
                </behavior>
            </serviceBehaviors>
</behaviors>

And your service would be using behaviorConfiguration="myBehavior"

With these settings, your software should work properly after restarting the software. Ensure your settings are done properly.

Thanks, it should work.

Related Questions