FireworksColdFusionDreamweaverFreehandFlashMXHome
Latest New Content

Latest Free Content
View All
Free Content
Accessibility
CMX Learning Guides
Hosted by enterhost

Using the Google search API from ASP.NET

By: Jay Oliver

Page 1 of 2

Set for printing

Next

I'm sure just about everyone knows about the Google search engine by now. What everyone might not know is that you can utilize Google's search functionality right from within your own web applications.

Not only is this a possibility, it's actually quite easy to do, as you'll soon find out.

As exciting as this is, there are still a few mundane preliminary steps you'll have to take before you can start this project.

The first two steps listed above are necessary and may not be skipped. The third step (the SDK) is important for one aspect of the process if you'd like to follow along with this article exactly. Installing the SDK is the only legal way I am aware of to get a copy of wsdl.exe, which this article relies on, as well as other valuable tools and documentation that any serious ASP.NET developer should have.

However, if you find a 120+ meg download intimidating, I have included the C# file that is created through that process in the downloadable files for this article. If you opt to use this, you will still need the .NET framework, which weighs in around 23 megs.

Perform these steps, and return to this article after you have done so.

Getting Started

The very first thing we need to do is to create an an area to run the application from. I have chosen c:\inetpub\wwwroot\GoogleAPI as my application's directory.

Application Directory

Additionally, due to the nature of how we will be interfacing with the Google API, we have to set this directory up as a virtual application within IIS.

In Windows 2000 and XP Professional, you can access the Internet Information Services console from the Administrative Tools folder in the control panel
(Start > Settings > Control Panel > Administrative Tools > Internet Information Services)

Once in there, drill down to the Default Web Site and Right click on it. Choose Properties from the context menu to bring up the properties for that folder.

Folder Properties

Within the Directory tab of the folder properties dialog, click the "Create" button to designate this folder to act as a self contained application. This is very important because without doing this, any code in this folder, would run in the scope of the parent application (meaning for example, that you would have to put all .dll's in the parent folder's /bin directory).

Google API Properties

Page 1 of 2 1 2 Next


download
Download Support Files


Keywords
Web Services SOAP Google API ASP.NET Proxy WSDL