Next, you need to configure IIS so it will run Visual WebGui applications. Because Visual WebGui is built on ASP.NET, the ASP.NET engine handles its applications. But for IIS to run Visual WebGui-based applications, you need to configure it to recognize the .wgx
(for Silverlight) file extensions. Visual WebGui doesn't actually create any .wgx
files; those are virtual files that redirect processing to the Visual WebGui handler—specifically, to the Gizmox.WebGUI.Server.Router
handler for DHTML, and to the Gizmox.WebGUI.Server.Silverlight.Router
handler for Silverlight.
|Figure 6. Web Site Properties: From the Web Site Properties dialog, click the Configuration button.|
To configure IIS, open the IIS console, and select the web site for which you want to enable Visual WebGui applications. On Windows XP, you always have one web site, named Default
. On Windows Server 2003, you can have multiple web sites on a single server instance, so you must enable the .wgx
extensions on every web site you plan to run Visual WebGui applications.
Right-click on the web site for which you want to enable Visual WebGui, and select Properties. Go to the Home Directory tab, and click the Configuration button (see Figure 6). Locate the .aspx extension, and click the Edit button. You'll see a dialog that lets you specify the handler for ASP.NET aspx web pages. Don't alter that handler. Instead, follow these steps:
- Select and copy the full path name of the executable handler. For example, for NET 2.0 it is c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll.
- Close the configuration editor, and click the Add button to add a new handler configuration for .wgx files.
- In the Executable field type the copied handler path (the same one as for ASPX), enter .wgx in the Extension field
- In the Verbs section, click the "Limit to" item and enter the four operations GET, HEAD, POST, and DEBUG.
- Finally, uncheck the "Check that file exists" checkbox.
- Click OK to save the settings and close the dialog.
Now, IIS will recognize and will be able to run Visual WebGui applications. Figure 7
shows all these settings.
|Figure 7. IIS Extension Mapping: Use this dialog to configure extension mapping for Visual WebGui applications (WGX).|
With IIS set up to run Visual WebGui applications, you're ready to build and run the skeleton application. When you run it, you'll see the empty main for (an empty browser window with a light gray background).
Now you can move on to complete the project prototype.