i am learning wcf. so i create wcf project and that has one class. code as follows
namespace TestWcfService1
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
public class Service1 : IService1
{
public string GetData(string value)
{
return string.Format("You entered: {0}", "Welcome " + value);
}
}
}
now when i am trying to add the wcf service reference to my console apps like add service reference and the service url like this http://localhost:21541/Service1.svc then i am getting error called Metadata contains a reference that cannot be resolved: 'http://localhost:21541/Service1.svc'.
so i am just not being able to achieve my goal. i know some where i am missing something and that is why i am getting error. so please guide me how to add service ref to console apps. app.config will be updated automatically or do i need to write anything there. help please. thanks