我有自己的WCF服务库配置(App.config中)和web应用配置(Web.config文件)问题
的app.config
服务客户端库项目。
该项目在我的Web应用程序中引用。问题是我的web应用程序抛出以下异常
Could not find endpoint element with name 'HttpEndPoint' and contract 'ServiceLibReference1.IDalService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.
服务没有问题。如果我直接在Web应用程序中引用我的服务,它会在客户端配置被添加到web.config中时正常工作。但我的要求是将其保存在单独的图书馆项目中。
该例外的原因是服务配置不会添加到web.config。我应该总是手动添加它们吗?不应该VS添加相应的配置到web.config每当一个服务库被引用?或者我错过了什么?
感谢