giz*_*rel 6 c# wcf wcf-binding livecycle visual-studio
当我尝试调用Adobe Livecyle Soap服务时出现以下错误:
值不能为空.参数名称:uri
奇怪的是我没有任何名为"uri"的参数.我无法调试此错误,因为服务甚至无法启动.错误消息是我所有的.
这是代码,我传递参数:
BasicHttpBinding binding =
new BasicHttpBinding(BasicHttpSecurityMode.Transport);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
LetterService.LETTER_APPLICATIONS_Client client =
new LetterService.LETTER_APPLICATIONS_Client(
binding,
new EndpointAddress(
System.Configuration.ConfigurationManager.AppSettings["URL"]));
Run Code Online (Sandbox Code Playgroud)
参数to EndpointAddress()命名URI(您可以将光标放在后面(,然后按Ctrl + Shift + Space以查看参数列表).
您可以通过替换来验证这是否是问题:
new EndpointAddress(
System.Configuration.ConfigurationManager.AppSettings["URL"]));
Run Code Online (Sandbox Code Playgroud)
..具有如下内容:
new EndpointAddress("http://your.service.uri/");
Run Code Online (Sandbox Code Playgroud)
如果可行,您知道您的错误与配置相关.
| 归档时间: |
|
| 查看次数: |
17141 次 |
| 最近记录: |