Configure and Deploy WPF Applications
These questions are based on 70-502 CSHP - TS - Microsoft .NET Framework 3.5: Windows Presentation Foundation (C# .NET)
Self Test Software Practice Test
Objective: Configure and deploy WPF applications.
Sub-objective: Deploy to a partial trust environment.
Single answer, multiple-choice
You are developing an XAML Browser Application (XBAP) using the Microsoft .NET Framework 3.5. The application includes a non-compiled data file named copyright_notice.xaml.
You want to add a hyperlink that points to the file copyright_notice.xaml without generating a security exception. Which Extensible Application Markup Language (XAML) should you use?
To access an application data file in a partial trust environment, you must navigate to the file as a site of origin. Site of origin files are the only option to access application data files in a partial trust environment for XBAPs. The following Pack URI syntax for a site of origin file is as follows:
The Pack URI scheme is based on the Open Packaging Conventions (OPC) specification to make content available through a URI hierarchy. Pack URIs consists of a protocol, authority and path in the following syntax:
Windows Presentation Foundation (WPF) includes two authorities: application and siteoforigin. The application authority includes resource and content files, while the siteoforigin authority is intended for files outside an assembly or its references. Files known at compile time use the application authority, and files available only at run time use the siteoforigin authority. Absolute URIs specify the authority, while relative references assume the application authority.
You cannot use any URI other than site of origin files in a partial-trust environment. You can use site of origin files in other environments, but site of origin files are the only option for data files in a partial trust environment. You can use file, HTTP and application authority pack URIs in a full-trust environment only.