我有一个 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.