title: Invalid URI: The URI is empty while consuming the web service
body: <p>I have added a webservice in my project, with the help of this link : <a href="https://msdn.microsoft.com/en-us/library/bb628649.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/bb628649.aspx</a></p>
  
  <p>I have made by url dynamic by following the steps of this link <a href="http://www.codeproject.com/Articles/12317/How-to-make-your-Web-Reference-proxy-URL-dynamic" rel="nofollow">http://www.codeproject.com/Articles/12317/How-to-make-your-Web-Reference-proxy-URL-dynamic</a> </p>
  
  <p>but the problem is I don't have the URI in my reference.cs. Also I don't have web.config file. </p>
  
  <p>It gives the following error when I run my client: </p>
  
  <pre><code>Unhandled Exception: System.UriFormatException: Invalid URI: The URI is empty.
  at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
  at System.Uri..ctor(String uriString)
  at OCC_Client.pivClassTestClient.pivClassWebService.set_Url(String value) in
  at OCC_Client.pivClassTestClient.pivClassWebService..ctor() in C:\Workspace\O
  at OCC_Client.Program.Main(String[] args) in C:\Workspace\OCC_Client\OCC_Client
  </code></pre>
  
  <p>It points to this section of the code in the refernce.cs file </p>
  
  <pre><code>public new string Url {
          get {
              return base.Url;
          }
          set {
              if ((((this.IsLocalFileSystemWebService(base.Url) == true) 
                          &amp;&amp; (this.useDefaultCredentialsSetExplicitly == false)) 
                          &amp;&amp; (this.IsLocalFileSystemWebService(value) == false))) {
                  base.UseDefaultCredentials = false;
              }
              base.Url = value;
          }
      }
  </code></pre>
  
  <p>Please help. I'm very new to web services. </p>