[英]webservice throws error System.ServiceModel.EndpointNotFoundException
Here is how my 2 projects are 这是我的两个项目的样子
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.