title: Calling a WCF service without client or proxy
body: <p>I have a service contract as follows:</p>
  
  <pre><code>[ServiceContract]
  public interface IWebProxyService
  {
      [OperationContract]
      string GetSomeData();
  }
  </code></pre>
  
  <p>I have also tried this attribute on the contract.</p>
  
  <pre><code>[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetFormsBaseUrl")] 
  </code></pre>
  
  <p>Is it possible to call this from another application without any service references/contracts.</p>
  
  <p>I have tried the a bunch of variations of the following (from calling app):</p>
  
  <pre><code> public static void GetSomeData(string webServiceProxyURL)
      {
          WebRequest request = WebRequest.Create(webServiceProxyURL);
          request.Method = "GET";
          request.ContentType = "application/json";
          HttpWebResponse response = (HttpWebResponse)request.GetResponse();
          Stream dataStream = response.GetResponseStream();
          StreamReader reader = new StreamReader(dataStream);
          string responseFromServer = reader.ReadToEnd();
          Console.WriteLine("Response: \n" + responseFromServer);
  
      }
  </code></pre>
  
  <p>I get a "The remote server returned an error: (400) Bad Request". The web exception status is "System.Net.WebExceptionStatus.ProtocolError" What am I doing wrong, how can I call the WCF method from the other app?</p>