none
ConfigurationErrorException was unhandled RRS feed

  • Question

  • i built a wpf application using bingmapweb services

    i used reverse geocode services

    here is the cs file

    private void button1_Click(object sender, RoutedEventArgs e)
            {
                labelResults.Content =  ReverseGeocodePoint(textInput.Text);

            }
            private string ReverseGeocodePoint(string locationString)
            {
                string results = "";
                string key = "insert your Bing Maps key here";
                ReverseGeocodeRequest reverseGeocodeRequest = new ReverseGeocodeRequest();

                // Set the credentials using a valid Bing Maps key
                reverseGeocodeRequest.Credentials = new Geocode.Credentials();
                reverseGeocodeRequest.Credentials.ApplicationId = key;

                // Set the point to use to find a matching address
                Geocode.Location point = new Geocode.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 > 0)
                    results = geocodeResponse.Results[0].DisplayName;
                else
                    results = "No Results found";

                return results;
            }

     

    but error was given in the bOld line

    ConfigurationErrorException was unhandled

    Unrecognized attribute 'decompressionEnabled'. Note that attribute names are case-sensitive. (D:\Users\rohitshaw\Documents\Visual Studio 2010\Projects\Bingmapsample\Bingmapsample\bin\Debug\Bingmapsample.vshost.exe.Config line 72)

     

    plzzz help

    • Moved by Hongye Sun - MSFT Monday, May 24, 2010 9:19 AM Bing Map API issue (From:Visual Studio Debugger)
    • Moved by Ricky_Brundritt Saturday, March 10, 2012 10:39 AM (From:Bing Maps: Map Control and Web services Development)
    Sunday, May 23, 2010 9:42 AM

Answers

  • Have you tried removing the reference to the DecompressionEnabled property?
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
    Tuesday, May 25, 2010 12:00 AM

All replies

  • I haven't seen that error before but try taking a look in your bindings that get generated in your configuration file. If there is a property called 'decompressionEnabled' try commenting it out and seeing if it helps.

    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
    Monday, May 24, 2010 2:16 PM
  • I just got the same issue occurring.

    I migrated a 2008 project that includes WCF services to 2010 and tried to run it and got the same error.

    <Edit> On further investigation, it appears that this attribute was inserted when I re-created the service references within the UI project. And the DecompressionEnabled attribute is a .net 4 framework attribute. However I am targetting 3.5.

    Please help.

    Brett

    • Edited by Brett Morris Monday, May 24, 2010 11:35 PM Further investiion
    Monday, May 24, 2010 11:16 PM
  • Have you tried removing the reference to the DecompressionEnabled property?
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
    Tuesday, May 25, 2010 12:00 AM
  • Yes, and this fixes the issue.

    But, everytime I update the service references, I have to remove the DecompressionEnabled property.

    I hope this is in the pipes to be fixed for SP1

    Wednesday, June 23, 2010 10:53 PM
  • try to make the target framework of your application to "4.0 "

    it works for me

    Tuesday, August 23, 2011 1:35 PM