title: How to get Bing Map Session Key from code behind
body: <p>To reduce the billable transaction in my web form asp.net project, i decided to test it.</p>
  
  <p>I have come across following example on msdn for session key.</p>
  
  <pre><code>Map.CredentialsProvider.GetCredentials(
      Function(c)
          Dim sessionKey As String = c.ApplicationId
          'Generate a request URL for the Bing Maps REST services.
          'Use the session key in the request as the Bing Maps key
         Return 0
      End Function)
  </code></pre>
  
  <p><strong>My Code example</strong></p>
  
  <pre><code>private String GeocodeAddress(string address)
  {    string results = "";
  
  string key = "Bing Maps key";
  GeocodeRequest geocodeRequest = new GeocodeRequest();
  
  // Set the credentials using a valid Bing Maps key
  geocodeRequest.Credentials = new GeocodeService.Credentials();
  geocodeRequest.Credentials.ApplicationId = key;
  
  // Set the full address query
  geocodeRequest.Query = address;
  
  // Set the options to only return high confidence results 
  ConfidenceFilter[] filters = new ConfidenceFilter[1];
  filters[0] = new ConfidenceFilter();
  filters[0].MinimumConfidence = GeocodeService.Confidence.High;
  
  // Add the filters to the options
  GeocodeOptions geocodeOptions = new GeocodeOptions();
  geocodeOptions.Filters = filters;
  geocodeRequest.Options = geocodeOptions;
  
  // Make the geocode request
  GeocodeServiceClient geocodeService = new GeocodeServiceClient();
  GeocodeResponse geocodeResponse = geocodeService.Geocode(geocodeRequest);
  
  if (geocodeResponse.Results.Length &gt; 0)
      results = String.Format("Latitude: {0}\nLongitude: {1}", 
        geocodeResponse.Results[0].Locations[0].Latitude, 
        geocodeResponse.Results[0].Locations[0].Longitude);
  else
      results = "No Results Found";
  
  return results;
  </code></pre>
  
  <p>}</p>
  
  <p>After debugging it, i can't see any difference b/w (application id / session key) and Bing Api key. How can i get sessionkey in above example?</p>