OnlineAddressBook Sample: Stores an Address Book in an XML Web Service
Demonstrates the use of session state to store an address book in an XML Web service created with ATL Server.
The OnlineAddressBook sample uses OLE DB client template classes to store a user's address book and lets the user set and retrieve this information using an XML Web service created with ATL Server.
This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.
Microsoft Office XP
Building and Running the Sample
This sample requires Microsoft Office XP.
To build and run this sample
Open the solution file, OnlineAddressBook.sln, in the Visual Studio development environment.
Modify the OnlineAddressBookWS.disco file and the deployment project target computer name to point to the computer you are planning to deploy to. Alternately, you can run all of the projects without any modifications if you deploy and run everything to localhost.
Copy the included Microsoft Access database, OnlineAddressBookWS.mdb, to your C:\ drive. Alternatively, you can copy it to a different location as long as you modify MYDATASOURCE, which is defined in the file OnlineAddressBookWS\OnlineAddressBookWS.h.
Build OnlineAddressBookWSIsapi and OnlineAddressBookWS. This step will also create a virtual directory on your computer and deploy the relevant files there.
Build the included C# project, OnlineAddressBookCSharpClient. Set it as a startup project and run it so that you can use this client to import your current personal address book from Microsoft Outlook XP and upload it to your server or any server running this XML Web service. You can also create your own contacts and upload them to the XML Web service and later download them from anywhere.
Build OnlineAddressBookSRF. This will deploy an ATL Server project with a built-in XML Web service client. Once you have created an account and added some records to your address book with it using the C# client, you can use this project to view your contacts using a browser. This page should be in http://localhost/OnlineAddressBookWS/OnlineAddressBookSRF.srf.