Click here to Skip to main content
13,832,971 members
Rate this:
Please Sign up or sign in to vote.
See more:
When I create WCF service and when I add reference service
This message appear ( an error occurred while attempting to find services)
and in details is say make sure about your metadata
My web Config is:
<?xml version="1.0"?>
<?xml version="1.0"?>

    <compilation debug="true" targetFramework="4.0" />
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <modules runAllManagedModulesForAllRequests="true"/>


and my CS file is

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace MService
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    public interface IMService
        string GetTime(int timeStrength);

I do not understand the problem
There are anyone know and help please

Best regards
Updated 3-Oct-11 7:17am
Bala Selvanayagam 3-Oct-11 12:06pm
how do you add the reference to the client ? GO/ DISCOVER

1.Paste the service URL and click 'GO' on the 'Add Service Reference' screen
2.Paste the service URL and click 'DISCOVER' on the 'Add Service Reference' screen

Also, are you trying to do from the same machine or different machine ?
Noor2011 3-Oct-11 12:48pm
Bala thank you
but my problem is when I press right click on my service name to add service reference I press discover and I show URL but when I click OK it's show massege ( “An error (Details) occurred while attempting to find services)
the same in this picture:
Thank you once again

Bala Selvanayagam 3-Oct-11 13:18pm
Few more clarification pl

Web service hosted in IIS ?

If not you can try hosting in IIS and call the hosted URL ?
If hosted, make sure you can access the webserice via the browser

let me know what happens
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I think there is an error in your WCF service. Try building the WCF service first and check if there are errors then fix it. Once you are able to compile your WCF service without an error, then you can try adding the service reference.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

It Looks like you have only defined a service behavior not the service, endpoint in the web.config.

a helpful tool to manage this config is in VS2010 goto

>> Tools | WCF Service Configuration Editor

that will open a nice little manager app to help you with your web.config

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.190114.1 | Last Updated 6 Oct 2011
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100