Ran across this post on Charlie Calvert's Community Blog using TerraServer's Web Services with LINQ...why is this interesting to me - many moons ago (before .NET was officially launched) I approached Tom Barclay who was running TerraServer and convinced him to expose the TerraServer web site as a web service. It's great to see the TerraServer web services still are being used...
Over the holidays Alex Turner, Mary Deyo and I added a new sample to the downloadable version of the CSharp samples that accompany Visual Studio 2008. This sample is called the LinqToTerraServerProvider, and it appears in a sub-directory called WebServiceLinqProvider. The LINQ provider technology that makes this sample possible is also used by other tools such as LINQ to Amazon, LINQ to LDAP, LINQ to SharePoint, and LINQ to Google Desktop.
- The Samples Download page: http://msdn2.microsoft.com/en-us/vcsharp/bb330936.aspx
- Direct link to the samples: http://msdn2.microsoft.com/en-us/vcsharp/bb894665.aspx
- Japanese samples: http://msdn2.microsoft.com/en-us/vcsharp/bb977898.aspx
When you download the samples, unzip the package into your Documents or My Documents directory or some other location where you have full rights. Navigate to the LinqSamples directory and then the directory called WebServiceLinqProvider. Open the LinqToTerraServerProvider solution. If you get a warning stating the "Project location is not trusted" you can safely ignore it. To avoid getting the warning in the future, right click on the solution file and choose properties. Select the Unblock button in the security section.
The TerraServer example shows how to create a LINQ provider. The provider technology makes it possible for your to extend LINQ to enable querying a new data source. For instance, LINQ ships with the ability to query SQL servers, XML files and generic objects. The LINQ provider technology allows you to extend LINQ so you can query a new data source such as a text file or a web site. This particular sample shows how to write a provider that makes it possible for LINQ developers to query the web service provided by the TerraServer mapping and aerial photography web site.