PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/VBSL3OOB/VBSL3OOB/ReadMe.txt

#
Plain Text | 125 lines | 95 code | 30 blank | 0 comment | 0 complexity | ae05b7a336f3bb560277ccb83cfcf2dc MD5 | raw file
  1========================================================================
  2    SILVERLIGHT APPLICATION : VBSL3OOB Project Overview
  3========================================================================
  4
  5/////////////////////////////////////////////////////////////////////////////
  6Overview:
  7
  8This example demonstrates how to work with OOB using VB.
  9It includes the following features:
 10Install OOB with code (but you cannot remove OOB with code).
 11Check if the application is already installed.
 12Check for updates.
 13Check for network state.
 14
 15
 16/////////////////////////////////////////////////////////////////////////////
 17Prerequisites:
 18
 19Required:
 20Silverlight 3 Chained Installer
 21http://www.microsoft.com/downloads/details.aspx?familyid=9442b0f2-7465-417a
 22-88f3-5e7b5409e9dd&displaylang=en
 23
 24
 25/////////////////////////////////////////////////////////////////////////////
 26Usage:
 27
 28As for the usage of this sample, first please make sure you've set the
 29VBSL3OOB.Web project as the startup project. Otherwise some features will not
 30work properly.
 31
 32Click the Install with code Button, or right click and choose Install VBSL3OOB
 33application onto this computer, to install the application.
 34
 35Close the browser, but do not close the OOB window. Update the source code,
 36rebuild and launch the application in browser again. You'll notice the OOB
 37application has not been updated yet. Click Check for update in the OOB
 38application (not the browser application), and you'll see it asks you to
 39restart the OOB. After you restart, you'll notice the update has been applied.
 40
 41Disable your network connection, and note the red text (information about
 42network status) in the bottom of the screen being updated. Enable your network
 43connection again, and the red text will be updated again.
 44
 45
 46/////////////////////////////////////////////////////////////////////////////
 47Documentation:
 48OOB, as the name indicates, allows you to work with Silverlight applications
 49out of browser. It is very easy to configure a Silverlight application to
 50support OOB within Visual Studio. In the Properties page of the Silverlight
 51project, simply check "Enable running application out of browser". Click the
 52Out-Of-Browser Settings Button to configure the OOB properties. The MSDN
 53document has detailed description about the properties.
 54http://msdn.microsoft.com/en-us/library/dd833073(VS.95).aspx
 55    
 56Under the hook, what Visual Studio does is exactly creating a manifest file
 57that corresponds to that described in the MSDN document. You can find it in
 58the Bin folder after you build your application. You can also edit the
 59OutOfBrowserSettings.xml file under the Properties folder directly, if you
 60don't want to use the tool.
 61
 62OOB supports update, if it is downloaded from a web site (instead of local
 63file system). But you have to manually check if an update is available by
 64handling the Application.Current.CheckAndDownloadUpdateCompleted event.
 65
 66Most Silverlight features work fine in OOB. However, certain features will
 67only work if the application is installed from a web site. For example, check
 68for update. That's why this sample includes a web application. Please run the
 69web application instead of the Silverlight application directly. Also, if the
 70application needs to perform network access, you'll have to host it in a web
 71site. Otherwise you'll ge cross-scheme errors even if you run inside the
 72browser...
 73
 74Network features work fine in OOB. If you're accessing a network resource
 75from the same domain where you install the application, no cross-domain
 76policy file is needed. Otherwise, as long as the cross-domain policy file
 77allows you to access the resource, it will work fine.
 78
 79So how does OOB work? Actually the following application is always launched
 80when you open an OOB application:
 81For x86: C:\Program Files\Microsoft Silverlight\sllauncher.exe
 82For x64: C:\Program Files (x86)\Microsoft Silverlight\sllauncher.exe
 83
 84This application accepts a command line argument like:
 85(a number as ID).domainname
 86
 87When you install the OOB, several files will be downloaded to the following
 88folder:
 89
 90For Vista and later:
 91Users\yourname\AppData\LocalLow\Microsoft\Silverlight\OutOfBrowser
 92\NumberAsID.domain
 93
 94For ealier OS:
 95Documents and Settings\yourname\Local Settings\Application Data\Microsoft
 96\Silverlight\OutOfBrowser\NumberAsID.domain
 97
 98You'll find a metadata file in this location. This metadata file stores
 99information such as where this OOB was downloaded. This affects both update
100and network. If you modify this file to specify another domain, update will
101no longer work, and the original domain does not contain a cross-domain
102policy file, you will no longer be able to access to the network resource.
103However, you can actually use it at your advantage to access network
104resources on another domain that does not have a cross-domain policy file.
105Please refer to the following instructions:
106
107Create your application so that it accesses a network resource on another
108domain that does not have a cross-domain policy file (such as www.bing.com).
109Install the OOB.
110Open the metadata file for the OOB application.
111Modify the FinalAppUri, OriginalSourceUri, and SourceDomain properties, so
112that they point to the external domain.
113Launch the OOB application, and you'll notice you're able to access the
114network resources on the other domain.
115
116However, you have to instruct your users to perform all those steps.
117
118
119/////////////////////////////////////////////////////////////////////////////
120References:
121
122http://msdn.microsoft.com/en-us/library/dd833073(VS.95).aspx
123
124
125/////////////////////////////////////////////////////////////////////////////