Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

http request error 401: unauthorized

This is a discussion on http request error 401: unauthorized within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, In my environment, I have an ISA 2000 Proxy Server. This prevents me to use web applications for Map ...

  1. #1
    okanss is offline Junior Member White Belt
    Join Date
    Jun 2005
    Posts
    1

    http request error 401: unauthorized

    Hi,

    In my environment, I have an ISA 2000 Proxy Server. This prevents me to use
    web applications for Map Point.

    I'have a Console Application developed in VS.Net It runs successfully

    So I thought I can create windows forms applications as well. But windows
    form applications fails just like web applications.


    The code running successfully within Console Application is below

    WebProxy myProxy = new WebProxy("myproxy:8082",true);
    myProxy.Credentials = CredentialCache.DefaultCredentials;

    FindServiceSoap myFindService = new FindServiceSoap();
    myFindService.Proxy = myProxy;

    NetworkCredential ourCredentials = new
    NetworkCredential("MPusername",@"MPpassword");

    myFindService.Credentials = ourCredentials;
    myFindService.PreAuthenticate = true;

    FindSpecification findSpec = new FindSpecification();
    findSpec.InputPlace = "Seattle";
    findSpec.DataSourceName = "MapPoint.NA";

    FindOptions myFindOptions = new FindOptions();
    myFindOptions.ThresholdScore = 0.5;
    myFindOptions.Range = new FindRange();
    myFindOptions.Range.StartIndex = 0;
    myFindOptions.Range.Count = 20;
    findSpec.Options = myFindOptions;

    string[] myEntityTypes = new string[1];

    try
    {
    FindResults myFindResults = myFindService.Find(findSpec);

    if (myFindResults.Results != null)
    {
    Console.Write("OK");
    string st56 =
    myFindResults.Results[0].FoundLocation.LatLong.Latitude.ToString() ;

    if (myFindResults.Results[0].FoundLocation.Entity.DisplayName == null)
    {
    st56 += myFindResults.Results[0].FoundLocation.Entity.Name;
    }
    else
    {
    st56 += myFindResults.Results[0].FoundLocation.Entity.DisplayName;
    }
    }
    }
    catch (Exception myException)
    {
    Console.WriteLine(myException.Message);
    }



    But when I copied this code to the Click event of a button in a windows form
    application I got the following error

    System.Net.WebException: The request failed with HTTP status 401:
    Unauthorized as
    System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(...


    Note :
    I created a CommonServices.dll using the wsdl.exe
    I'm adding CommonServices.dll to the both projects.

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    401 is Unauthorized. in HTTP proto. I think you talk about mappoint web service, if so then you ar on wron forum ... try the right one

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Very important request : How to know pushpins into a area ?
    By Vincent BENNER in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 06-15-2007, 11:12 AM
  2. MapPoint WebService http 403 forbidden error
    By duongtuphong in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-06-2005, 04:00 PM
  3. Error while connecting mp webservice : (401)Unauthorized
    By psbaj in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 11-24-2004, 05:24 AM
  4. new feature request
    By jhblack76 in forum Wish List
    Replies: 0
    Last Post: 10-27-2004, 09:23 AM
  5. request discussion push pin demo problem
    By ToddF in forum Products: Pushpin Tool, Single State Mapper
    Replies: 0
    Last Post: 04-26-2004, 11:01 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96