簡體   English   中英

值不能為空。參數名稱:uri

[英]Value cannot be null. Parameter name: uri

當我嘗試調用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"]));

EndpointAddress()的參數名為URI (您可以將光標放在( ,然后按Ctrl + Shift + Space以查看參數列表)之后。

您可以通過替換來驗證這是否是問題:

new EndpointAddress(
            System.Configuration.ConfigurationManager.AppSettings["URL"]));

..具有如下內容:

new EndpointAddress("http://your.service.uri/");

如果可行,您知道您的錯誤與配置相關。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM