开发者

webservice throws error System.ServiceModel.EndpointNotFoundException

Here is how my 2 projects are

  1. I have a class library project which consumes multiple webservices.
  2. I have created a test project in VSTS and try to call one of those service

But I'm receiving System.ServiceModel.EndpointNotFoundException. In my Test Project I have added one app.config file and added endpoi开发者_StackOverflow中文版nt as available in my Serviceclass library project app.config.

Could anyone have encounter same problem before. Please help.

Thanks, Pritam


Is your service class library hosted in IIS? If so, you need to add the relevant info (everything in <system.serviceModel>) to your web.config.

Are you self-hosting the WCF service? Then the host application needs to have that info in its app.config.

You cannot just put that info into the service class library's app.config - that file will not be used by .NET - you need to put the info into the host application's web.config (for IIS) or app.config (if you self-host).


Not sure but check this: - Maybe you have the endpoint twice in your app.config - App.config that should have endpoint configuration is the one in the testproject

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜