Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WPF Progam中的App.config,在调试期间工作,但未编译_C#_Wpf_Web Services - Fatal编程技术网

C# WPF Progam中的App.config,在调试期间工作,但未编译

C# WPF Progam中的App.config,在调试期间工作,但未编译,c#,wpf,web-services,C#,Wpf,Web Services,我有一个WPF程序,它使用VisualStudio生成的Soap服务 当我在VisualStudio中以调试模式运行它时,它工作正常(我将契约放在app.config中) 但是,当我在编译后运行它时,在program所在的目录中使用App.config时,我得到以下错误: ERROR: Could not find endpoint element with name 'LodgeSoap' and contract 'SMSwebService.LodgeSoap' in the Servi

我有一个WPF程序,它使用VisualStudio生成的Soap服务

当我在VisualStudio中以调试模式运行它时,它工作正常(我将契约放在app.config中)

但是,当我在编译后运行它时,在program所在的目录中使用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.

编译应用程序时,程序集将位于bin/debug或bin/release目录中。请确保文件夹中存在[application name].exe.config文件,并且此文件中存在soap服务配置信息。

编译应用程序时,它将在bin/debug或bin/release目录中包含程序集。请确保文件夹中存在[application name].exe.config文件,并且此文件中存在soap服务配置信息