1

I have a WCF Service Project. I have another Class library project where I am calling the WCF service. And from a Web Application i am callign the class librabry.

In the Class library I am writing

new ChannelFactory<CompanyServiceContract>("CompanyServiceEndPoint")

But an exception is coming which says unable to find the End point "CompanyServiceEndPoint".

I have seen this question Could not find default endpoint element but I don't know about WS configuration settings into the main projects app.config

Can someone please help?

Community
  • 1
  • 1
Deviprasad Das
  • 4,203
  • 7
  • 36
  • 51
  • In a web application, the endpoint configuration needs to go into the web.config file. – Codo Dec 15 '11 at 07:59

1 Answers1

0

Shouldn't "CompanyServiceEndPoint" actually be an endpoint? (a string url to the service method, eg: "http://me.me.com/myService" or an EndpointAddress).

Can you access your wcf endpoint by other means? a browser? Fiddler ? WcfTestClient?

Did you define an endpoint for the scv in code? eg: http://msdn.microsoft.com/en-us/library/ms734681.aspx

I think in the first instance you need to find out if the fault is with the service or the client that calls the service. If you can hit the service with any of the clients above - then look to the client.

Neil Thompson
  • 6,356
  • 2
  • 30
  • 53