Partager via


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

Comments

  • Anonymous
    May 20, 2007
    Saurab, a PM on the UiFX team posted a screencast on the new application services coming in Visual Studio

  • Anonymous
    May 20, 2007
    I was just about to record my first screencast on Client Application Services I was presenting a week

  • Anonymous
    May 23, 2007
    One of my favorite features in Orcas is the ability to leverage the ASP.NET Application services from

  • Anonymous
    May 24, 2007
    Client Application Services in "Orcas"

  • Anonymous
    June 03, 2007
    .NET Client Application Services Client Application Services in Windows Forms: End-to-End Walkthrough...

  • Anonymous
    June 11, 2007
    Thanks to everyone who stopped by the Acropolis and Windows Forms booth at Tech-Ed! Double thanks if

  • Anonymous
    September 27, 2007
    Back in May, I posted an early version of my Client Application Services walkthrough, which was used

  • Anonymous
    December 04, 2007
    I have updated my Client Application Services sample (previous posts here and here ) to work with the

  • Anonymous
    May 16, 2008
    I wrote the blog post below about 6 months back and just realised that I never actually got around to