http://www.developer.com/net/asp/article.php/3735111/Client-Application-Services-Getting-Started.htm
The primary function of the ASP.NET framework is web site provisioning. It helps deliver static and dynamic (both client and server side) content over HTTP protocol. But, as ASP.NET has progressed, lots of value-added features that are required by most applications have been added to it. ASP.NET provides the following ready-to-use features that are required by every access-controlled web site: The ASP.NET Application Services layer is built-in web services that expose thesee features in various standard formats so that they can be accessed by any application other than ASP.NET web applications. The following types of clients are supported to access the ASP.NET Application Services Layer: The client and services framework provided by ASP.NET 2.0 AJAX Extensions and .NET 3.5 to configure and develop .NET Framework Windows clients that can use ASP.NET application services is called Client Application Services. Thus, it enables multiple Windows and web applications to share user management functionality (login, role, and profile) from a common server. The main features of Client Application Service are: Figure 1 shows how Client Application Services make the ASP.NET Application Services available to Windows Clients. Figure 1: High Level Architecture showing Client Application Services As shown in Figure 1, Windows-based clients have two API choices to access ASP.NET Application Services: Figures 2 and 3 show a detailed call flow path of an authentication request: Figure 2: Request at client end Figure 3: Request at service end Now, you can create a sample ASP.NET application service and use it from a Windows Client using Client Application Services. The following sample uses Authentication request as an example. Figure 4: Create new ASP.NET Web Service Application This code will expose the authentication service as a web service. This configures the Membership framework to use the custom 'SampleProvider' that will be developed in the next steps. The Membership provider is responsible for managing and validating the credentials. Project -> ClientAppService Properties -> Web -> Change the default setting of 'Auto-assign Port' to 'Specific Port' as shown in Figure 5. Also, change the virtual path to '/ClientAppService'. Figure 5: Configure Web Service to run on a fixed port Figure 6: Creating a new Windows Forms Application Project -> ClientApp Properties -> Services: Figure 7: Enable Client Application Service Figure 8: Client Login Form Figure 9: Output on wrong credentials Figure 10: Output on correct credentials Client Application Services simplifies the access to ASP.NET Application Services and thus helps in managing the user information, authentication, and authorization at a common place for both web and Windows Applications. Other important things that can be tried out using Client Application Services are: Vikas Goyal is a Microsoft MVP Solutions Architect with several years of industry experience. He is mainly involved in designing products/solutions for Financial Industry. He can be contacted via his web site, http://www.VikasGoyal.net; or his blog, http://dotnetwithme.blogspot.com.
Client Application Services: Getting Started
March 19, 2008
Overview
Features
Architecture

Click here for a larger image.


Walkthrough
Creating and Configuring an ASP.NET Application Service

Click here for a larger image.
<system.web.extensions>
<scripting>
<webServices>
<authenticationService enabled="true"
requireSSL = "false"/>
</webServices>
</scripting>
</system.web.extensions>
<membership defaultProvider="SampleProvider">
<providers>
<add name="SampleProvider"
type="ClientAppService.SampleProvider"/>
</providers>
</membership>
<authentication mode="Forms" />
public class SampleProvider : MembershipProvider
public override bool ValidateUser(string username,
string password)
{
bool flag = false;
if (username == "SampleUser" &&
password == "SamplePassword")
flag = true;
return flag;
}

Click here for a larger image.
Creating the Windows Client

Click here for a larger image.

Click here for a larger image.

if (!Membership.ValidateUser(textUserName.Text,
textPassword.Text))
{
MessageBox.Show("Incorrect Username or Password",
"Pls try again",
MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
else
{
MessageBox.Show("Login Successful","Welcome",
MessageBoxButtons.OK, MessageBoxIcon.Information);
Application.Exit();
}


Conclusion
About the Author