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