Value cannot be null. Parameter name: uri
Asked Answered
A

1

6

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"]));
Actuary answered 4/4, 2013 at 7:49 Comment(4)
You'll have to show your code. The error means that a method you call has been passed a value of null for its 'uri' parameter.Madelina
You can edit your question to add more details. This is very useful if you want to share code, because you can use the {} button to format it - you can't do a decent job of code formatting in comments. The edit link is at the bottom left under the tags.Dap
And it's almost certainly the EndpointAddress constructor that's throwing the exception - check your config file and make sure that you have a "LetterMergeURL" appSetting.Dap
Uniform resource identifier (URI) is used to identify a website or resource so this is a strong indicator that your error is in part of your code which points to such a resource. This should give you a good idea on where to look to debug your code.Settera
E
6

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.

Exportation answered 4/4, 2013 at 8:23 Comment(1)
That solved the problem, it is all about the config-file. Thank you for the answer.Actuary

© 2022 - 2024 — McMap. All rights reserved.