Once you starting to get serious about virtual earth you are going to need to get a token.
Token information is required mainly for two reasons –
· Identify the account ID using the VE Platform API for logging, reporting and billing purposes.
· Provide a reasonable level of protection against fraudulent transactions for our paying customers and ourselves.
This is how you do it.
- Get a Windows Live ID at https://login.live.com. If you already have a Windows Live ID, you can use it instead of creating a new one.
- Sign up for a Virtual Earth Platform developer account. Go to https://mappoint-css.live.com/mwssignup and sign up for a free evaluation developer account.
- Once you have received account creation confirmation email, you can manage your Virtual Earth Platform developer account on the Virtual Earth Platform Customer Services site. You use your Windows Live ID to log in to the Customer Services site , and if its your first time it will ask you to change your password. This will essentially lock you out for up to two hours but sometimes it works faster. I found that i was confused with which number was my token so make sure you use the one in the email that is the token that you should use to get your VE Credential.
- On the Manage Account page of the Virtual Earth Platform Customer Services site you will find your Account ID. The Manage Password page allows you to set the password for this account ID.
- If you are using Visual Studio to build your application, then in your web application project add a web reference to the staging or production Virtual Earth Token Service
- Set your account ID and account password in the Credentials property of the CommonServiceSoap Class before making requests to the Virtual Earth Token Service using the CommonServiceSoap.GetClientToken Method.
- The CommonServiceSoap.GetClientToken Method returns a string, which is the Virtual Earth Token. This token can be used in your Virtual Earth Web Services or Virtual Earth Map Control application.
Woot you watied two hours and now your ready to use your token and password
Token Service URLs
Virtual Earth provides a staging environment to test your application and a production environment to use once you have become a licensed customer.
Staging Environment
https://staging.common.virtualearth.net/find-30/common.asmx?wsdl
Note Developer evaluation accounts only have access to the Staging environment.
Production Environment
https://common.virtualearth.net/find-30/common.asmx?wsdl
To access the Production environment, you must be a licensed customer. Contact the Microsoft Virtual Earth Licensing Team for more information.
Note Activity in the production environment is billable. For more information about Billable Transactions, see the Viewing Virtual Earth Transaction Reports topic.
Adding the Token Service as a Visual Studio Web Reference
The steps below outline adding a web reference to the Token Service from your Visual Studio project.
- Launch the Add Web Reference dialog. Select the Add Web Reference item from either the Project menu or the contextual menu for the project in the Solution Explorer.
If you are using Visual Studio 2008 and Add Web Reference is not present in either the Project menu or the contextual menu for the project, do the following:
-
-
- Enter either the staging or production Token Service URL from above for the Url and click Go.
- When prompted, enter your Virtual Earth Developer Account ID and Password. This is usally like 3 –5 times so have it ready to cut and paste
- Once the WSDL has been downloaded, give the web reference a name such as "TokenService". Click Add Reference.
Now go read some of my virtual earth web service tutorials and you can rock it!
Bam your tokenized. Now all you have to do is grab the services you want and start programming against them. Have fun!