Discussion:
401 Error message, Account Access, Token server, service access
(too old to reply)
DanielCarr
2009-01-29 14:30:07 UTC
Permalink
Hi,

I am a final year university student developing a web
application for my final year project and my account details are as follows:

Account name: CarrDanel136535
Account ID: 136535
Status: Active

I have been attempting to access the virtual earth staging platform at:
http://staging.common.virtualearth.net/find-30/common.asmx

is it possible that my account does not have access for this web service but
it does for the mappoint platform at:
http://staging.mappoint.net/standard-30/mappoint.wsdl

however I haven’t had any success using this one either. If I am not
registered for the virtual earth platform could you point me in the direction
as to where to go, and if I am any suggestions at what I’m doing wrong?

I am using an authentication class described by a current/former employee on
a weblog found here
http://blogs.msdn.com/virtualearth/archive/2008/09/26/getting-a-map-with-the-virtual-earth-web-service.aspx

with my code being:

using net.virtualearth.common.staging;

/// <summary>
/// Authenticating for VE Tokens
/// </summary>
public class Authentication
{
public static string strVEWSToken;
public static string VEauthID;
public static string VEauthPass;
public static string Authenticate(string strIP)
{
VEauthID = "136535";
VEauthPass = "%MyGPSTrax_7";

CommonService commonService = new CommonService();
commonService.Url = "https://common.virtualearth.net/find-30/common.asmx";
commonService.Credentials = new System.Net.NetworkCredential(VEauthID,
VEauthPass);

// Create the TokenSpecification object to pass to GetClientToken.
TokenSpecification tokenSpec = new TokenSpecification();

// Use the Page object to retrieve the end-client’s IPAddress.
tokenSpec.ClientIPAddress = strIP;

// The maximum allowable token duration is 480 minutes (8 hours).
// The minimum allowable duration is 15 minutes.
tokenSpec.TokenValidityDurationMinutes = 480;

// Now get a token from the Virtual Earth Platform Token service.
strVEWSToken = commonService.GetClientToken(tokenSpec);
return strVEWSToken;
}
}

Finally I have also been having issues with getting the IP address of the
client using the application. When developing the application on my own PC
the method described below only returns the loopback IP address due to it
using a virtual server. However I have uploaded it to another server and I
can’t seem to obtain the IP address of my computer when running the
application on an external server. I am currently using the following code:

Page.Request.UserHostAddress


Any help with either of these issues would be greatly appreciated as i’ve
been searching the web for days with little joy currently.

Thanks in advance,

Daniel Carr
DanielCarr
2009-01-30 00:19:01 UTC
Permalink
apologies, obviously I left my password in the code above by accident, this
has subsequently been changed since.

Thanks,

Dan
Post by DanielCarr
Hi,
I am a final year university student developing a web
Account name: CarrDanel136535
Account ID: 136535
Status: Active
http://staging.common.virtualearth.net/find-30/common.asmx
is it possible that my account does not have access for this web service but
http://staging.mappoint.net/standard-30/mappoint.wsdl
however I haven’t had any success using this one either. If I am not
registered for the virtual earth platform could you point me in the direction
as to where to go, and if I am any suggestions at what I’m doing wrong?
I am using an authentication class described by a current/former employee on
http://blogs.msdn.com/virtualearth/archive/2008/09/26/getting-a-map-with-the-virtual-earth-web-service.aspx
using net.virtualearth.common.staging;
/// <summary>
/// Authenticating for VE Tokens
/// </summary>
public class Authentication
{
public static string strVEWSToken;
public static string VEauthID;
public static string VEauthPass;
public static string Authenticate(string strIP)
{
VEauthID = "136535";
VEauthPass = "%MyGPSTrax_7";
CommonService commonService = new CommonService();
commonService.Url = "https://common.virtualearth.net/find-30/common.asmx";
commonService.Credentials = new System.Net.NetworkCredential(VEauthID,
VEauthPass);
// Create the TokenSpecification object to pass to GetClientToken.
TokenSpecification tokenSpec = new TokenSpecification();
// Use the Page object to retrieve the end-client’s IPAddress.
tokenSpec.ClientIPAddress = strIP;
// The maximum allowable token duration is 480 minutes (8 hours).
// The minimum allowable duration is 15 minutes.
tokenSpec.TokenValidityDurationMinutes = 480;
// Now get a token from the Virtual Earth Platform Token service.
strVEWSToken = commonService.GetClientToken(tokenSpec);
return strVEWSToken;
}
}
Finally I have also been having issues with getting the IP address of the
client using the application. When developing the application on my own PC
the method described below only returns the loopback IP address due to it
using a virtual server. However I have uploaded it to another server and I
can’t seem to obtain the IP address of my computer when running the
Page.Request.UserHostAddress
Any help with either of these issues would be greatly appreciated as i’ve
been searching the web for days with little joy currently.
Thanks in advance,
Daniel Carr
Loading...