Click here to Skip to main content
15,894,646 members
Articles / Desktop Programming / XAML

A Silverlight application with the WCF RIA Services Class Library

Rate me:
Please Sign up or sign in to vote.
4.72/5 (11 votes)
3 Mar 2010CPOL8 min read 62.8K   1.8K   39  
A Silverlight application using the WCF RIA Services Class Library. Demonstrates how to implement a custom Authorization Service, utilize localized resources, and add unit tests for DAL.
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="BizApp.App"
             xmlns:app="clr-namespace:BizApp"
             xmlns:appsvc="clr-namespace:System.Windows.Ria.ApplicationServices;assembly=System.Windows.Ria"
             xmlns:res="clr-namespace:BizApp.Helpers"
             >

    <Application.ApplicationLifetimeObjects>
        <!--
          Quick Start:
           We need to add the generated WebContext to the application lifetime objects.
           Also, we'll use this opportunity to specify the type of authentication we're
           using and the domain context that was generated from our authentication
           domain service.
        -->
        <app:WebContext>
            <app:WebContext.Authentication>
                <appsvc:FormsAuthentication 
                    DomainContextType="BizApp.Services.Server.DomainServices.AuthenticationContext, BizApp.Services, Version= 1.0.0.0"/>
            </app:WebContext.Authentication>
        </app:WebContext>
    </Application.ApplicationLifetimeObjects>
    
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Assets/Styles.xaml"/>
                <ResourceDictionary>
                    <res:ApplicationResources x:Key="LocalStrings" />
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
    
</Application>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Latvia Latvia
Jevgenij lives in Riga, Latvia. He started his programmer's career in 1983 developing software for radio equipment CAD systems. Created computer graphics for TV. Developed Internet credit card processing systems for banks.
Now he is System Analyst in Accenture.

Comments and Discussions