Client Application Services in Windows Forms: End-to-End Walkthrough Available

The Beta 1 release of Visual Studio Code Name "Orcas" includes a new feature called Client Application Services. This feature enables Windows client applications to easily access user-management services hosted by a centralized ASP.NET Web service application.

The documentation for client application services is still in progress, but we have created an end-to-end walkthrough to demonstrate the key features. This walkthrough will be used as a lab session at the upcoming TechEd 2007 conference, but if you want a sneak peek, download the attached zip file, which contains the walkthrough and sample projects in Visual Basic and C#.

(From the walkthrough introduction:) In this walkthrough, you perform the following tasks:

  • Create a Windows Forms application and use the Visual Studio project designer to enable and configure client application services. 
  • Create a simple ASP.NET Web Service application to host the application services and test your client configuration.
  • Add forms authentication to your application. You will start by using a hard-coded user name and password to test the service. You will then add a login form by specifying it as a credentials provider in your application configuration. 
  • Add role-based functionality, enabling and displaying a button only for users in the "manager" role. 
  • Access Web settings. You will start by loading Web settings for an authenticated (test) user on the Settings page of the project designer. You will then use the Windows Forms Designer to bind a text box to a Web setting. Finally, you will save the modified value back to the server. 
  • Enable offline mode. You will provide a check box so that users can specify their connection status. You will then use this value to specify whether the client application service providers will use locally cached data instead of accessing their Web services. Finally, you will re-authenticate the current user when the application returns to online mode.

UPDATE (9/27/2007): I have extensively revised and updated this walkthrough for the Visual Studio 2008 RTM documentation. To preview these updates, download the attached UsingClientApplicationServices.zip file, which includes the new walkthrough plus VB and C# projects containing updated Visual Studio solutions that work with the Visual Studio 2008 (formerly code-named "Orcas") Beta 2 release. These updates include a "remember me" login feature, a logout button, and more robust code that demonstrates appropriate exception handling for cases such as login expiration and server unavailability. Enjoy!

UPDATE (12/04/2007): The attached UsingClientApplicationServices.zip now includes VB and C# projects that will work with the Visual Studio 2008 RTM release. Additionally, the full documentation is now available on MSDN. See:

UsingClientApplicationServices.zip