简体   繁体   中英

Value cannot be null. Parameter name: uri

I get the following error when I am trying to invoke my Adobe Livecyle Soap service:

Value cannot be null. Parameter name: uri

The strange thing is that I don't have any parameter named "uri". I can't debug this error since the service can't even start. The error message is all I've got.

Here is the code, that I pass the parameter:

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"]));

The parameter to EndpointAddress() is named URI (You can place your cursor just after the ( , and press Ctrl + Shift + Space to see the parameter list).

You could verify that this is the problem by replacing:

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

..With something like the following:

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

If that works, you know your error is config-related.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM