Community of VE/MapPoint Users and Developers
This is a discussion on http request error 401: unauthorized within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| http request error 401: unauthorized 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. |
| |||
|
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
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| 401, error, http, request, unauthorized |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Very important request : How to know pushpins into a area ? | Vincent BENNER | MapPoint 2006/2009 Discussion | 4 | 06-15-2007 11:12 AM |
| MapPoint WebService http 403 forbidden error | duongtuphong | MapPoint 2006/2009 Discussion | 0 | 02-06-2005 04:00 PM |
| Error while connecting mp webservice : (401)Unauthorized | psbaj | MapPoint 2006/2009 Discussion | 7 | 11-24-2004 05:24 AM |
| new feature request | jhblack76 | Wish List | 0 | 10-27-2004 09:23 AM |
| request discussion push pin demo problem | ToddF | Products: Pushpin Tool, Single State Mapper | 0 | 04-26-2004 11:01 AM |