The value cannot be null. Parameter Name: uri

I get the following error when I try to call my Adobe Livecyle Soap program:

The value cannot be null. Parameter Name: uri

The strange thing is that I have no parameter called uri. I cannot debug this error since the service cannot even start. The error message is all I have.

Here is the code that passes 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"]));

Thanks in advance.

+5
source share
1 answer

The parameter EndpointAddress()is called URI(you can place the cursor immediately after (and click Ctrl + Shift + Spaceto view the list of parameters).

You can verify that this is a problem by replacing:

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

.. Something like the following:

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

If this works, you know that your error is configuration related.

+5
source

All Articles