问题描述
当调用从一个控制台应用程序,asp.net应用程序,WPF / winform应用程序WCF服务,你必须有对WCF服务端点信息的app.config或web.config文件。但是,从FitNesse的,我打电话夹具这是一个.dll(类库),这夹具叫我的WCF服务。它不能调用该服务,因为我不能包括它需要的端点信息 - 因为DLL文件不能拥有的app.config文件。关于如何调用从FitNesse的WCF服务的任何想法。
When calling a WCF service from a console app, asp.net app, wpf/winform app, you have to have a app.config or web.config file for the WCF service endpoint information. But from FitNesse, I'm calling a fixture which is a .dll (class library) and this fixture is calling my WCF service. It can't call the service because I can't include the endpoint information that it needs - because DLLs can't have app.config files. Any ideas on how to call a WCF service from FitNesse.
推荐答案
我不得不把我的app.config文件中的FitNesse的dotnet的目录。我也有一个路径添加到配置文件在我FitNesse的网页,是这样的。
I had to place my app.config file in the dotnet directory of FitNesse. I also had to add a path to that config file in my FitNesse page, like this.
路径C:\ fitnesse20090214 \ FitNesse的\ DOTNET \的app.config
!path C:\fitnesse20090214\fitnesse\dotnet\app.config
这篇关于如何调用从FitNesse的WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!