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"]));
A-Sharabiani
  • 17,750
  • 17
  • 113
  • 128
gizemdemirel
  • 377
  • 2
  • 4
  • 13
  • 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. – devdigital Apr 04 '13 at 07:51
  • 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. – Damien_The_Unbeliever Apr 04 '13 at 07:58
  • 1
    And it's almost certainly the `EndpointAddress` [constructor](http://msdn.microsoft.com/en-us/library/ms404972.aspx) that's throwing the exception - check your config file and make sure that you have a "LetterMergeURL" `appSetting`. – Damien_The_Unbeliever Apr 04 '13 at 08:01
  • 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. – Amicable Apr 04 '13 at 08:12

1 Answers1

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.

Kjartan
  • 18,591
  • 15
  • 71
  • 96