title: Bing Maps Credentials Don't Exist?
body: <p>I'm messing about with the Bing Maps WPF control and SOAP services, trying to reverse geocode a point. I tried to implement some code from <a href="http://www.codeproject.com/Articles/79123/Sample-WPF-Application-Consuming-Bing-Maps-Web-Ser" rel="nofollow">this project</a>, specifically this block of code:</p>
  
  <pre><code>private string ReverseGeocodePoint(string locationString)
            {
                string results = "";
                ReverseGeocodeRequest reverseGeocodeRequest = new ReverseGeocodeRequest();
  
                // Set the credentials using a valid Bing Maps key
                reverseGeocodeRequest.Credentials = new GeocodeService.Credentials();
                reverseGeocodeRequest.Credentials.ApplicationId = key;
  
                // Set the point to use to find a matching address
                GeocodeService.Location point = new GeocodeService.Location();
                string[] digits = locationString.Split(';');
  
                point.Latitude = double.Parse(digits[0].Trim());
                point.Longitude = double.Parse(digits[1].Trim());
  
                reverseGeocodeRequest.Location = point;
  
                // Make the reverse geocode request
                GeocodeServiceClient geocodeService = new GeocodeServiceClient();
                GeocodeResponse geocodeResponse = geocodeService.ReverseGeocode(reverseGeocodeRequest);
  
                if (geocodeResponse.Results.Length &gt; 0)
                    results = geocodeResponse.Results[0].DisplayName;
                else
                    results = "No Results found";
  
                return results;
            }
  </code></pre>
  
  <p>However, when I try to implement it, I'm being told: <code>Error: The type or namespace name 'Credentials' does not exist in the namespace 'GeocodeTest.GeocodeService' (are you missing an assembly reference?)</code> This error occurs on the line:</p>
  
  <pre><code>reverseGeocodeRequest.Credentials = new GeocodeService.Credentials();
  </code></pre>
  
  <p>Curious, I decided to take a look at the service reference through the object browser. Apparently, my <code>GeocodeService</code> doesn't even have a <code>Credentials</code> member. So now the question is:</p>
  
  <ul>
  <li><strong>Should I add the member myself? If so, how would I do this?</strong></li>
  <li><strong>If not, what alternatives to do have in terms of providing credentials?</strong></li>
  </ul>