Page view counter
IIS configuration instructions for hosting the 1.1 Quickstart samples Subscribe to this thread
Last post 05-01-2007 6:30 PM by timlt. 1 replies.
Sort Posts:
05-01-2007 6:30 PM
IIS configuration instructions for hosting the 1.1 Quickstart samples

If you've browsed the Silverlight web site yet, you know by now that the Silverlight 1.1 Alpha Quickstart documentation and samples can also be downloaded from here, and hosted on your PC.  This not only gives you offline access to the Quickstart docs, it's a nice way to hack the sample code, experiment with your own samples, etc.

Included in the 1.1 Quickstart documentation .ZIP file is a Readme.htm file with setup instructions for configuring IIS and getting your PC ready to host the documentation and samples.  This information is generally useful in that it gives you the essential setup details that you need for hosting ANY Silverlight-based web application on IIS.  Because we have already made a couple of updates and corrections to the Readme.htm file, and it may be a few days before the download version of the file is updated, I decided to post the setup information here on the forums as a temporary convenience for new users. 

Following is the full content of the updated Readme.htm file that ships with the Silverlight 1.1 Alpha Quickstart Documentation download, and you will find the information in this file useful not only for setting up the 1.1 Quickstart docs, but it's also generally useful in showing how to configure IIS for hosting a Silverlight-based application.  Note in the Prerequisites that if you are just setting up a server to host a Silverlight-based Web site, and the server is not a development machine, you do not have to install the full Visual Studio "Orcas" Beta 1 version on the server.  You can install just the .NET Framework version 3.5 Beta 1 instead.  Note also, that the instructions below apply ONLY to configuring an offline documentation site, for private access on your local machine or internal network.  To configure a secure site for public access, you should follow best practices for securing web sites as documented in the MSDN documentation for IIS and ASP.NET.

 =================================

 

Microsoft Silverlight Offline Quickstart Documentation

This download contains the offline QuickStart documentation for Microsoft Silverlight version 1.1 Alpha (May 2007), initially released as a Community Technology Preview in April 2007. The same content is available online as the Microsoft Silverlight 1.1 Alpha QuickStart Documentation. For the most current versions of the content, please check the online site.

You can use the files in this download to install the QuickStart documentation as an ASP.NET Web site that you host on your development computer. The documentation includes running code examples that will work on this released version of Silverlight.

Prerequisites

The computer that hosts the documentation Web site must have the following software installed in order to run the documentation Web site:

  • Internet Information Services (IIS).
  • The .NET Framework version 2.0, with ASP.NET 2.0 configured and running on the default Web site in which you create the virtual directory for the documentation.
  • Microsoft Visual Studio codename “Orcas” Beta 1. You can get this from the Visual Studio beta download page. If you do not wish to install Visual Studio, you can install only the .NET Framework version 3.5 Beta 1 from the Silverlight download site, which provides the components required to run the code examples.
  • Microsoft Silverlight version 1.1 Alpha (May 2007).  For current installation information and downloads, see http://www.silverlight.net.

Create the Documentation Web Site on Windows XP or Windows Server 2003

*For Windows Vista setup instructions, see the next section.

Follow these steps to install the files and create a Web site that lets you view the documentation.

  • Create a folder on the host computer and extract the contents of the zip file into it.
  • Open the Internet Information Services Manager (IIS Manager), right-click the Default Web site, select New, and create a new virtual directory using the virtual directory creation wizard.  When the wizard prompts you for the alias of the directory, enter devpreview.  It is important to name the virtual directory devpreview, because some paths in the documentation website are coded to that specific path name.  When the wizard asks you what content directory to use, browse to the local folder in which you extracted the contents of the .ZIP file.  In the access permissions step of the wizard, give it permissions to Read and Run Scripts.  Note:  If you do not give permissions to Run Scripts, the virtual directory will not be created as an application, and the documentation site will not work.
  • In IIS Manager, right-click the node for the new devpreview virtual directory, select Properties, and follow these steps:
    1. Click the Directory Security tab, click Edit in the Anonymous access and authentication control section, and then make sure that the virtual directory is configured for anonymous user access. (This is typically the default configuration, so you probably do not need to change the setting.)  Note:  You also need to ensure that the account used for anonymous access, or a user group of which this account is a member, is given Read or Read and Execute permissions on the Windows folder that contains the files for this Web site. To confirm this now, open Windows Explorer, browse to the folder, right-click the folder and select Sharing and Security, and then click the Security tab. If the account being used for anonymous access does not appear on the folder with the required permissions, add it now.
    2. In the Documents tab, make sure that the Enable Default Document option is checked.
    3. If there is no default file entry for Default.aspx in the list, add one.  Also add entries for  Default.htm and Default.html, if not already present.
    4. In the Virtual Directory tab, make sure that Scripts only is selected in the Execute Permissions list.
    5. Click Apply, and close the properties window for the new virtual directory.
    6. In the IIS Manager, select and expand the node for the new virtual directory you created.
    7. Right-click on the Samples subdirectory, and then click Properties.
    8. Click the HTTP Headers tab, and click Mime Types (it may be called File Types in some IIS versions).
    9. Register each of the following new file extension types for the Samples directory. You are doing this so that these file types can be downloaded by the Web server to the Silverlight runtime. For each item in the following table, click the  New button to create a new MIME type, enter the extension string in the Extension text box, enter the MIME Type string in the Mime Type text box, and then click OK.
      Extension MIME Type
      dll Assembly
      xaml XAML file
      py IronPython file
      jsx Managed Jscript file
      pdb .NET Symbols file
      When you have finished entering MIME Types, click OK, then click Apply, and close the IIS Manager.
    10. You can launch the Quickstart documentation site, if it is hosted on your development machine, using a local URL such as http://localhost/devpreview.  Note:  If the documentation site initially fails to run, and you receive browser errors saying that the service is unavailable, or that there are insufficient permissions to access the IIS metabase, you may need to run the Aspnet_Regiis.exe utility from the ASP.NET 2.0 system directory to register the new site and give permissions to the machine account being used by the ASP.NET process.  For Windows 2003, the account used by ASP.NET is the NT Authority\Network Service account, and in Windows XP SP2 and Vista, it is the ASPNET account. You can find further help information in these online support topics: ASP.NET IIS Registration Tool, Metaacl.exe modifying metabase permissions for the IIS Admin Objects, and How to repair IIS mapping after you remove and reinstall IIS.

Create the Documentation Web Site on Windows Vista

Follow these steps to install the files and create a Web site that lets you view the documentation.

  • Create a folder on the host computer and extract the contents of the zip file into it. 
  • Open the Internet Information Services Manager (IIS Manager), and in the Connections pane, right-click the Default Web site, select Add Virtual Directory, and create a new virtual directory. In the field for the alias of the directory, enter devpreview. It is important to name the virtual directory devpreview, because some paths in the documentation website are coded to that specific path name. In the field for the physical path to use, use the path to the local folder in which you extracted the contents of the .ZIP file.
  • After the virtual directory has been created, right-click the new virtual directory in the Connections pane, and click Convert to Application.
  • In IIS Manager, select the node for the new devpreview virtual directory, and follow these steps:
    1. Ensure that you are in Features view in the details pane for the virtual directory.
    2. Double-click the Authentication settings icon, ensure that only Anonymous Authentication is enabled, and click the Back button to return to the Features view.  Note:  You also need to ensure that the account used for anonymous access, or a user group of which this account is a member, is given Read or Read and Execute permissions on the Windows folder that contains the files for this Web site. To confirm this now, open Windows Explorer, browse to the folder, right-click the folder and select Properties, and then click the Security tab. If the account being used for anonymous access does not appear on the folder with the required permissions, add it now.
    3. Double-click the Authorization rules settings icon, and ensure there is an entry to allow all local users access to the site (this is enabled by default). Click the Back button to return to the Features view.
    4. Double-click the Default document settings icon, and ensure there entries for default documents named Default.aspx, Default.htm, and Default.html. Click the Back button to return to the Features view.
    5. In the Connections pane, expand the node for the devpreview virtual directory, and select the Samples folder.
    6. Double-click the Mime types settings icon in the details pane, and add entries for each of the Mime types indicated in the following table. You are doing this so that these file types can be downloaded by the Web server to the Silverlight runtime. For each item in the following table, click the Add button to create a new MIME type, enter the extension string in the File name extension text box, enter the MIME Type string in the Mime Type text box, and then click OK.
      Extension Mime Type
      py application/x-ironpython
      jsx application/x-managedjscript
      When you have finished entering MIME Types, close the IIS Manager.
    7. You can launch the Quickstart documentation site, if it is hosted on your development machine, using a local URL such as http://localhost/devpreview.

This posting is provided "AS IS" with no warranties, and confers no rights.

timlt

Loading...
Joined on 07-31-2003
Posts 1
Microsoft Communities