0

我有一个 WPF 程序,它使用由 Visual Studio 生成的 Soap 服务。

当我在 Visual Studio 中以调试模式运行它时,它工作正常(我将合同放在 app.config 中)

但是当我在编译后运行它时,在我的程序所在的目录中使用 App.config 我得到这个错误:

ERROR: Could not find endpoint element with name 'LodgeSoap' and 
contract 'SMSwebService.LodgeSoap' 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.
4

1 回答 1

3

编译应用程序时,程序集会在 bin/debug 或 bin/release 目录中。请确保文件夹中存在 [应用程序名称].exe.config 文件,并且此文件中存在肥皂服务配置信息。

于 2012-04-24T06:00:09.633 回答