Client Application Services - Part 1
page 4 of 7
by Bilal Haidar
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 47911/ 59

Client Application Services

If you have been following from the beginning of this article, you should have noticed how the concept of Application Services has evolved. First of all, the Application Services were added to ASP.NET 2.0, and after that AJAX developers were also able to access those Application Services from the client-side. What are left are the Windows Forms and Windows Presentation Foundation applications to access those Application Services and this enables having a single database containing the entire user’s information and shared by several application types including Web-AJAX and Windows applications.

What can be understood is that Client Application Services or CLAS, introduced with Visual Studio 2008 and .NET 3.5, is a way to allow a Windows Forms or WPF application to access the Application Services using the ASP.NET 2.0 AJAX 1.0 Extensions Application Services.

Usually, you would have a web application that is configured with ASP.NET 2.0 Application Services and ASP.NET 2.0 AJAX 1.0 Extensions Application Services and you need to use those application services in a new Windows Forms application.

CLAS mainly gives the windows application the power of:

Authenticating and authorizing users: By configuring the windows application to use the authentication service, the application can then authenticate and authorize users against a database just as a Web or AJAX application can do.

Operating in an Offline-mode: What makes CLAS even more powerful is that you can configure the application to cache all the processed information while the application is in live connection to the database and once the connection is off, the application can still operate in an offline mode by retrieving information from the cached data. Usually, SQL Server Compact Edition 3.5 database is used locally to store the information.

Visual Studio 2008 adds a new Tab to the project properties page called Services and is shown in Figure 1.

Figure 1: Windows Forms Services Tab

This is a new Tab that has been added to allow you to configure CLAS for your application. We will come to the above Tab later when we go in depth into how to configure CLAS for an application.

CLAS is a collection of application services and is built on top of several client application providers. For each of the services there is a provider that can be configured through the app.config configuration file.

When you configure the application using the Services Tab, automatically the configuration settings are added to the app.config file. Here is a sample configuration setting.

Listing 4

<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider"         
Type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, 
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35"            
serviceUri="http://localhost:55555/AppServices/Authentication_JSON_AppService.axd" 
credentialsProvider="ClientAppServicesDemo.Login, ClientAppServicesDemo" />
</providers>
</membership>

The above membership provider’s configuration section is so close to the one we saw earlier when configuring the Membership provider in an ASP.NET application. In the coming sections we will delve into more details about the providers and classes that ship with the CLAS.


View Entire Article

User Comments

Title: Mgr Appplication Development   
Name: Jothi
Date: 2008-12-30 11:28:42 AM
Comment:
Hi Bilal,
I would like to know if the same service can be used for multiple applications
Title: Client Application Services - Part 1   
Name: Safiyullah-India
Date: 2008-04-29 2:49:06 AM
Comment:
hi bilal... its good

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 8:41:51 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search