Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Mon, 28 Jul 2008 09:11:03 -0700,    group: microsoft.public.mappoint.webservice        back       


Implementing Customer Identification   
Trying to implement virtual earth map customer identification in staging.
I have created a web reference and the code is as follows:

net.mappoint.staging.CommonServiceSoap commonService = new 
net.mappoint.staging.CommonServiceSoap();
commonService.Url = "http://staging.mappoint.net/standard-30/common.asmx";
commonService.Credentials = new 
System.Net.NetworkCredential(ConfigurationManager.AppSettings["VEUserID"], 
ConfigurationManager.AppSettings["VEPassword"]);
net.mappoint.staging.TokenSpecification tokenSpec = new 
net.mappoint.staging.TokenSpecification();
tokenSpec.ClientIPAddress = Page.Request.UserHostAddress;
tokenSpec.TokenValidityDurationMinutes = 480;
string clienttoken = commonService.GetClientToken(tokenSpec);

The error returned is:
The request failed with HTTP status 403: Forbidden.

Any ideas?
date: Mon, 28 Jul 2008 09:11:03 -0700   author:   rockster

RE: Implementing Customer Identification   
1) did you create your development account at the VE Css site
2) did you use your account ID (not datasource name id) and password
3)  Debug and see what UserHostAddress is.. what I had to do was change the 
Page.Request.UserHostAddress..because if you using a router or switch I think 
it gives you 127.0.0.1, I instead used this code.

string hostName = Dns.GetHostName();
string clientip = Dns.GetHostAddresses(hostName).GetValue(1).ToString();

i used the 1, because we are using IPV4.. you can get back IpAddress[] and 
loop through check the ipv6 flag, then get the one that isnt that..

try the above though..good luck!





"rockster" wrote:

> Trying to implement virtual earth map customer identification in staging.
> I have created a web reference and the code is as follows:
> 
> net.mappoint.staging.CommonServiceSoap commonService = new 
> net.mappoint.staging.CommonServiceSoap();
> commonService.Url = "http://staging.mappoint.net/standard-30/common.asmx";
> commonService.Credentials = new 
> System.Net.NetworkCredential(ConfigurationManager.AppSettings["VEUserID"], 
> ConfigurationManager.AppSettings["VEPassword"]);
> net.mappoint.staging.TokenSpecification tokenSpec = new 
> net.mappoint.staging.TokenSpecification();
> tokenSpec.ClientIPAddress = Page.Request.UserHostAddress;
> tokenSpec.TokenValidityDurationMinutes = 480;
> string clienttoken = commonService.GetClientToken(tokenSpec);
> 
> The error returned is:
> The request failed with HTTP status 403: Forbidden.
> 
> Any ideas?
>
date: Fri, 8 Aug 2008 10:10:01 -0700   author:   Doug DeGenaro Doug

RE: Implementing Customer Identification   
Hi,
I'm trying to do exactly the same, but am having the same problem.
I've verified my credentials in the Customer Services & have added a 
reference to http://staging.mappoint.net/standard-30/mappoint.wsdl  in visual 
studio (2005).

My code is dead simple:
TokenService.CommonServiceSoap t= new  TokenService.CommonServiceSoap();
t.Credentials = new System.Net.NetworkCredential(this.veDevAccountID, 
this.veDevAccountPassword);
TokenService.TokenSpecification s = new TokenService.TokenSpecification();
s.ClientIPAddress = clientIP;
s.TokenValidityDurationMinutes = 1;
                
string token = t.GetClientToken(s);

Client IP is the current IP address of this machine.
I've checked that the account id & password are the same as I use to verify 
at customer services but still get 
The request failed with HTTP status 403: Forbidden.

The stack trace is:
   at 
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String 
methodName, Object[] parameters)
   at 
VirtualEarthImageProviderService.TokenService.CommonServiceSoap.GetClientToken(TokenSpecification specification)
   at 
VirtualEarthImageProviderService.VirtualEarthImageProviderService.RequestImage(String clientIP)

I'm running this on my work machine, so am behind a firewall & proxy, though 
ports 80 & 8080 are open. Is this some sort of NAT problem? A proxy issue? 
How can I fix this?

Any thoughts would be appreciated.

Regards

Ben
"Doug DeGenaro" wrote:

> 1) did you create your development account at the VE Css site
> 2) did you use your account ID (not datasource name id) and password
> 3)  Debug and see what UserHostAddress is.. what I had to do was change the 
> Page.Request.UserHostAddress..because if you using a router or switch I think 
> it gives you 127.0.0.1, I instead used this code.
> 
> string hostName = Dns.GetHostName();
> string clientip = Dns.GetHostAddresses(hostName).GetValue(1).ToString();
> 
> i used the 1, because we are using IPV4.. you can get back IpAddress[] and 
> loop through check the ipv6 flag, then get the one that isnt that..
> 
> try the above though..good luck!
> 
> 
> 
> 
> 
> "rockster" wrote:
> 
> > Trying to implement virtual earth map customer identification in staging.
> > I have created a web reference and the code is as follows:
> > 
> > net.mappoint.staging.CommonServiceSoap commonService = new 
> > net.mappoint.staging.CommonServiceSoap();
> > commonService.Url = "http://staging.mappoint.net/standard-30/common.asmx";
> > commonService.Credentials = new 
> > System.Net.NetworkCredential(ConfigurationManager.AppSettings["VEUserID"], 
> > ConfigurationManager.AppSettings["VEPassword"]);
> > net.mappoint.staging.TokenSpecification tokenSpec = new 
> > net.mappoint.staging.TokenSpecification();
> > tokenSpec.ClientIPAddress = Page.Request.UserHostAddress;
> > tokenSpec.TokenValidityDurationMinutes = 480;
> > string clienttoken = commonService.GetClientToken(tokenSpec);
> > 
> > The error returned is:
> > The request failed with HTTP status 403: Forbidden.
> > 
> > Any ideas?
> >
date: Thu, 30 Oct 2008 13:11:01 -0700   author:   Ben O'Hara Ben O'

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us