MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




http request error 401: unauthorized

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2005
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 06-09-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
401, error, http, request, unauthorized


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 04:12 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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