简体   繁体   English

Web服务抛出错误System.ServiceModel.EndpointNotFoundException

[英]webservice throws error System.ServiceModel.EndpointNotFoundException

Here is how my 2 projects are 这是我的两个项目的样子

  1. I have a class library project which consumes multiple webservices. 我有一个使用多个Web服务的类库项目。
  2. I have created a test project in VSTS and try to call one of those service 我已经在VSTS中创建了一个测试项目,并尝试调用其中一项服务

But I'm receiving System.ServiceModel.EndpointNotFoundException. 但是我正在收到System.ServiceModel.EndpointNotFoundException。 In my Test Project I have added one app.config file and added endpoint as available in my Serviceclass library project app.config. 在我的测试项目中,我添加了一个app.config文件,并添加了Serviceclass库项目app.config中可用的终结点。

Could anyone have encounter same problem before. 谁能遇到相同的问题。 Please help. 请帮忙。

Thanks, Pritam 谢谢,Pritam

Is your service class library hosted in IIS? 您的服务类库是否托管在IIS中? If so, you need to add the relevant info (everything in <system.serviceModel> ) to your web.config. 如果是这样,则需要将相关信息( <system.serviceModel>所有内容)添加到web.config中。

Are you self-hosting the WCF service? 您是否在自托管WCF服务? Then the host application needs to have that info in its app.config . 然后,主机应用程序需要在其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). 不能仅将信息放入服务类库的app.config -该文件将不会被.NET使用-您需要将信息放入主机应用程序的web.config (对于IIS)或app.config (如果您自己-主办)。

不确定,但请检查以下内容:-也许您的app.config中有两次端点-应具有端点配置的App.config是testproject中的端点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在IIS上使用WCF服务时引发System.ServiceModel.EndpointNotFoundException - System.ServiceModel.EndpointNotFoundException thrown when consuming wcf service on IIS Web服务重载时出现System.ServiceModel.CommunicationException - System.ServiceModel.CommunicationException on overloading webservice 使用 WCF Web 服务时获取 System.ServiceModel.ProtocolException - Getting System.ServiceModel.ProtocolException while Consuming WCF Webservice 服务器错误System.ServiceModel.Activation.HttpModule - Server Error System.ServiceModel.Activation.HttpModule 来自远程系统的Web服务错误 - Webservice Error from remote system 在本地环境中调试windows azure项目时System.ServiceModel.Channels.ServiceChannel出错 - Error for System.ServiceModel.Channels.ServiceChannel while debugging windows azure project in local environment 尝试打开 ASP.net 网站时出现 System.ServiceModel 错误 - System.ServiceModel Error While trying to open ASP.net website 无法识别的配置部分 system.serviceModel - Unrecognized configuration section system.serviceModel 使用System.ServiceModel.Syndication分页RSS - Paging of RSS using System.ServiceModel.Syndication 使用AJAX的ScriptManager异步从WebService获取数据并引发错误? - ScriptManager using AJAX gets data from WebService asynchronously and throws an error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM