.NET Client Application Services

Update:  hree are some MSDN docs that cover this topic: Exposing Web Services to Client Script and ASP.NET Application Services Overview  

One of my favorite features in Orcas is the ability to leverage the ASP.NET Application services from any client application (ASP.NET, Ajax, WinForms, WPF, or even Silverlight!)..  This allows you to do things like share a common membership, role management and profiles across a number of presentation tiers.  It also enables very easy roaming user state...

Check out how easy it is to use the profile store... here I am using Windows Authentication, but of course you can use forms or your own system just as well.  In fact any system can be rolled into the ASP.NET Auth system (there is a whole book on the subject).


Part 1: Create the web site.

1. In Orcas Beta1, Create a new ASP.NET Web Application

2. Fill in the profile section of the web.config.  Notice, you have to enable anonymous for the client designer functionality in Beta1 to work...

3. Enable this property to be accessed via web services by adding this section to Web Config


Part 2: Create the client app.

1. Right click on the solution and add a new project (works the same for WPF or WinForms)

2. Right click on the new client project and select properties

3. In the Services tab, enable application services, select windows auth and fill in the services url.  For now it is the development server, URL, in production this would be your ASP.NET web site.


4. In the settings tab, click on Load Web Settings... this will pull down all the metadata for the profile properties you defined on the server.     You can just hit "skip login" on the prompt for you credentials... Because we enabled anonymous auth, it is not needed


You are now ready to go!    You can have strongly typed, async read-write access from WPF, WinForms, Silverlight, ASP.NET and Ajax.  And all the user settings will stay in sync no mater where you change them, they are reflected everywhere!

 Check out a few examples

ASP.NET Server side code

Client side JavaScript



See the attached solution for all the code!


Looking for more?


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

What’s new in for clients apps in Orcas deck

Client application Services Screen webcast

Information about SQL Server Compact - Offline rocks! 

DEV10 - Extending the Browser Programming Model with Silverlight

Update... You can get the demo code for how to do this from Silverlight here.. The StockClient/StockService samples make use of the profile (to store the selected stock symbol) and isolated storage (to cache the stock data of the selected stock symbol).


Comments (23)

Cancel reply

  1. Anon says:

    "presentation tears."…tears…as in crying. I think you mean Tiers.

  2. Jason says:

    Thanks for this great nice post, but now I have tiers in my eyes, because the images are so blurry and very hard to read πŸ™‚

  3. BradA says:

    Thanks, I fixed the type-o…

    Jason – Sorry about theimages, I know they suck… I tried to resize a bit to make them more clear… But no luck.. I am open to suggestions πŸ˜‰  The full code is attached, feel free to read it iin your editor of choice!

  4. Don says:

    Please tell me that the blurry screenshots are because you dialed in too much compression and not because you used the camera on your phone to take screenshots.


  5. Daniel Moth says:

    Client Application Services in "Orcas"

  6. Damian says:

    Those blurry images… are you pasting into Windows Live Writer? If so don’t  use drop shadow border option.

  7. Nicholas says:


    It doesn’t matter. Live Writer eats the images up any way you slice it. I’ve mentioned this bug to them multiple times and have yet to see a fix. It’s the main reason why I still use BlogJet (and pay for it..)

  8. Brian says:

    "You are not ready to go!"  I assume you meant "You are now ready to go"?  Or is this one of those "Paging Dr. Freud" moments? πŸ™‚


  9. BradA says:

    Brian — thanks!  fixed!

  10. I spent my first few minutes experimenting with the new Client Application Services in "Orcas" today…

  11. This Teched in Orlando the new client application framework called " Acropolis " will be announced. From

  12. .NET Client Application Services Client Application Services in Windows Forms: End-to-End Walkthrough…

  13. In my first post on parameterized queries I built a simple login form that really was a contrived example

  14. In my first post on parameterized queries I built a simple login form that really was a contrived example

  15. alikl says:

    Re blurry images – in Live Writer use "Inherit From Web Log" option for borders configuration, try it and you will notice the difference immediately

  16. Fred says:

    Is there any way to link things in a bigger way than simply sharing the backend authentication / profiles providers functionality? I’m interested in using a WPF application to leverage it’s great UI facilities, but maintaining an existing ASP.Net Web Application for most of what I need to do. Is there any way I can provide a click-through experience, where a user that is authenticated in my WPF application can seamlessly enter the web-app without needing to supply credentials again? Having only one membership, roles and profiles store is great, but linking things up on the UI is almost as important!

    – Fred

  17. Our first .NET geek dinner was great!

  18. One of the neat features that Windows Forms developers get with the .NET Framework 3.5 and Visual Studio

  19. Today, let me talk about enhancements to ASP.NET that you will see with Visual Studio 2008 and .NET FX

  20. [εŽŸζ–‡εœ°ε€] ASP.NET enhancements in VS2008 and .NET FX3.5 [εŽŸζ–‡ε‘θ‘¨ζ—Άι—΄] Saturday, September 08, 2007 12:24 AM 今倩

  21. In ASP.NET 2.0, we introduced a very powerful set of application services in ASP.NET ( Membership , Roles

Skip to main content