0% found this document useful (0 votes)
116 views14 pages

Deploying A Visual WebGui IIS

This document discusses how to set up your development environment for creating and deploying a Visual WebGui Silverlight application. It describes installing Visual Studio 2005 or 2008, the Silverlight SDK, and the Visual WebGui SDK. It then walks through creating a sample VWG Silverlight app with controls, enabling the VWG-VS integration, selecting Silverlight as the presentation layer, and deploying the app via the generated XAP file.

Uploaded by

awesom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views14 pages

Deploying A Visual WebGui IIS

This document discusses how to set up your development environment for creating and deploying a Visual WebGui Silverlight application. It describes installing Visual Studio 2005 or 2008, the Silverlight SDK, and the Visual WebGui SDK. It then walks through creating a sample VWG Silverlight app with controls, enabling the VWG-VS integration, selecting Silverlight as the presentation layer, and deploying the app via the generated XAP file.

Uploaded by

awesom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

Developing and deploying a Visual WebGui


Silverlight application
Sunday, December 28, 2008
.NET (/visualwebgui/Tags/.NET) AJAX (/visualwebgui/Tags/AJAX) ASP.NET (/visualwebgui/Tags/ASP.NET) C# (/visualwebgui/Tags/C%23)
framework (/visualwebgui/Tags/framework) General Software Development (/visualwebgui/Tags/General%20Software%20Development)
Silverlight (/visualwebgui/Tags/Silverlight) tutorial (/visualwebgui/Tags/tutorial) vb.net (/visualwebgui/Tags/vb.net)
Visual Studio (/visualwebgui/Tags/Visual%20Studio) web applications (/visualwebgui/Tags/web%20applications)
web development (/visualwebgui/Tags/web%20development)

This article should give you a general idea how to set up your environment for developing and deploying a Visual WebGui
Silverlight application. From Visual WebGui version 6.2 the development experience of Silverlight has changed a bit.

The first thing you should do is make sure that you have Microsoft Visual Studio 2005 or 2008 installed (in order to be
able to customize themes and control’s XAML, you will need Visual Studio 2008).

You can chose to install or not to install Microsoft Silverlight SDK. Visual WebGui SDK includes the Silverlight DLL that
will be needed to deploy and run the application. But you will not be able to create your own Silverlight or VWG Silverlight
controls or create themes.

If you use VS 2008 and want to install the Microsoft Silverlight SDK go to “VWG for VS 2008” section.
If you are using VS 2005 or VS 2008 and don't want to install Silverlight SDK skip to the "VWG for VS 2005” section.

VWG for Visual Studio 2008 with SP1:

If you used Silverlight previous versions (pre-release) with Visual Studio 2008 you need to use the Visual Studio 2008
Service Pack Preparation Tool before you install the Silverlight RC1. You can download the tool here
(http://www.microsoft.com/downloads/details.aspx?FamilyId=A494B0E0-EB07-4FF1-A21C-
A4663E456D9D&displaylang=en).

Now install Silverlight Tools for Visual Studio 2008 SP1 you can download it from here
(http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=en).
This package is an add-on for Visual Studio 2008 SP1 to provide tooling for Microsoft Silverlight 2.

And last but not least install Visual WebGui SDK for .Net 3.5 you can download the SDK here
(http://www.visualwebgui.com/tabid/110/default.aspx).

VWG for Visual Studio 2005:

There is no install from Microsoft for Silverlight Tools for Visual Studio 2005. All you need to do is install the Silverlight
client to view Silverlight on your browser you can download it here
(http://www.microsoft.com/silverlight/resources/install.aspx).

And now install Visual WebGui SDK for .Net 2.0 (or 3.5 if your working with VS 2008 with out Microsoft SDK) and you can
create a VWG Silverlight applications. You can download the SDK here
(http://www.visualwebgui.com/tabid/110/default.aspx).

Let’s start creating a Visual WebGui Silverlight application. Open Visual Studio and create a new Visual WebGui
application (Since version 6.2 there is just one project template for Visual WebGui and all presentation layers are just a
check box click away as we will see later in this article).

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 1/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_4E1512D7.png)

Now that we have our VWG application let’s open Form1 in design mode and add a few controls.

First add a toolbar docked to the top.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image3_221F51EC.png)

Next I’ve added a Resources folder and Images to the solution and use them for the toolbar buttons.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_5BC99DE9.png)

Add a few buttons to the toolbar by clicking the buttons property in the control Properties window and set the button
Image property to one of the images we added.

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 2/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_5F00A733.png)

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_46298243.png)

Let’s add few more controls just that our demo application will have some context.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_03DE1C13.png)

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 3/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

Now let’s run our application and see the result.


From version 6.2 Visual WebGui is fully integrated into Visual Studio. This integration gives you a very easy to use
application configuration interface. You can read more about it here
(http://www.visualwebgui.com/Community/Resources/QuickStarts/tabid/365/articleType/ArticleView/articleId/327/The-new-
Visual-WebGui-integration-to-Visual-Studio.aspx).
Let’s enable the integration between VWG and VS. Right click on the project and select “Enable Visual WebGui”.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_08E80BD5.png)

Let’s select the starting form of our application right click on Form1.cs and select “Set As Start Form” this will set the form
as the main form and the starting point of the application much like the Main form in WinForms.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_6B2E3328.png)

Now to make sure that our application will run as a Silverlight application. Open the project property page in the
Deployment section. In this section you can select what presentation layers will be created for the application the default
is just DHTML.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_4EB662AA.png)

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 4/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

Let’s mark Silverlight as a valid presentation layer. This action will add the Server silverlight assembly to our project and
will generate the necessary XAP file that holds the Silverlight and VWG assemblies that need to be download to the client.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_1F1D6580.png)

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_0C6AFC7A.png)

Visual WebGui uses a WGX extension to rout the requests to the VWG server and the SWGX extension to the VWG
Silverlight server. You can customize the extension that you want to use in the Deployment section and later on set this
extension in the IIS (We will ses this later on).

We will leave the default extension and just update the starting form to start with the SWGX extension because we want
to see the application as a Silverlight application. Open the project property page in the Web section and set the start
page to start with Form1.swgx instead of starting with Form1.wgx and run our application .

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_2663DDFE.png)

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 5/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image49_7254600C.png)

Now that we have our application let’s look in to the packager that creates the XAP file. This file contains the compressed
client side assemblies and resources of a Silverlight application. This file is downloaded to the client and runs the
application

The XAP file is generated automatically and by default contains six files as described in the app manifest file.
<Deployment EntryPointAssembly="Gizmox.WebGUI.Silverlight"
EntryPointType="Gizmox.WebGUI.Silverlight.App"
RuntimeVersion="2.0.31005.0"
xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Deployment.Parts>
<AssemblyPart x:Name="Gizmox.WebGUI.Silverlight.Common"
Source="Gizmox.WebGUI.Silverlight.Common.dll"/>
<AssemblyPart x:Name="Gizmox.WebGUI.Silverlight.Controls"
Source="Gizmox.WebGUI.Silverlight.Controls.dll"/>
<AssemblyPart x:Name="Gizmox.WebGUI.Silverlight"
Source="Gizmox.WebGUI.Silverlight.dll"/>
<AssemblyPart x:Name="Gizmox.WebGUI.Silverlight.Themes.Default"
Source="Gizmox.WebGUI.Silverlight.Themes.Default.dll"/>
<AssemblyPart x:Name="System.Windows.Controls.Data"
Source="System.Windows.Controls.Data.dll"/>
<AssemblyPart x:Name="System.Windows.Controls" Source="System.Windows.Controls.dll"/>
</Deployment.Parts>
</Deployment>
If you open the property page Deployment section you can edit the XAP file structure of your application. Click the
advanced button to see XAP package creator.
The default XAP (the orange folder) holds basic Silverlight and VWG Silverlight assemblies. It’s recommended not to
remove these files as they are needed to start the application.

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 6/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_626CCD5B.png)

To the default XAP the packager will add any theme DLL that is declared in the registration section as a Silverlight Theme
assembly.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_5B74CCE9.png)

If you use in your application controls that are not part of the fifty out of the box controls that come with Visual WebGui
you need to register them in the registration section like this.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_19FF3BF2.png)

The packager allows you to create more XAP folders. This allows you to create an incremental download of the
application DLL’s. Instead of downloading all the application you can download all the necessary DLL according to stages
in the application. In the control registration I've added registration to controls from the Gizmox.WebGUI.Forms.Office
assembly. Let’s add another form and add the Ribbon bar control to it.

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 7/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_2625D77B.png)

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_1950A2BF.png)

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_42EC2005.png)

This form will be only if the user clicks button2 in form1.

private void button2_Click(object sender, EventArgs e)


{
Form2 objForm2 = new Form2();
objForm2.ShowDialog();
}
This means that there is no need to this assembly unless the users dose a specific action. There for I will place the
assembly not in the default XAP but in a secondary XAP file that I will add by clicking the add button in the packager tool.
This XAP file will be downloaded only if the user opens form2.

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 8/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_25324759.png)

Once we have our application ready we need to deploy it to the server. Open the folder containing the project and select
the Bin folder, Client Bin folder and Web.Config file. These are the only files that we need to deploy the application (If you
have resources you should add them too).

Once you uploaded the files to the server open the Internet Information Services (IIS).

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_7E8B6D1E.png)

Create a folder under the root directory and place those files in there.

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 9/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_0C162B7A.png)

In the IIS right click on the folder and open the folder’s properties. Click on create button and create a new Virtual

directory.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_3A282987.png)

Treat the site as a regular ASP.NET site.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_2BA74A59.png)

Now we need to register the Visual WebGui extensions under the default site in the IIS. Right click on the default site and
click on properties. Go to the “Home Directory” tab and click on Configuration.

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 10/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_37D07693.png)

In the application configuration click edit on the .aspx extension and copy the path from the executable textbox. Click the
cancel button to close the edit window..

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_378B7FA4.png)

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 11/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

Now click on the Add button to add a new extension. In the executable textbox paste the path that we just copied from the
aspx extension and in the Extension text box enter .wgx (don't miss the dot before WGX it’s there for a reason). Last
uncheck the Verify that file exists check box. And do the same with the Visual WebGui Silverlight extension .swgx (same
here the dot is needed).

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_49F8F1BB.png)

If you are asked to apply the extensions on other virtual directories select all and click OK.

This would be a good place to mention that silverlight applications require that the .XAP file will be registered.
Right-click on the computer name and select Properties. Click on the MIME-Types button to open the list of registered
files extensions. Click on the New button to add the MIME-Type if it’s missing. For file extension use .XAP and for the
MIME-Type use application/x-silverlight.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_2427ECBA.png)

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 12/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_7082110C.png)

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_119A2F09.png)

Now we can run the application.

(https://aspblogs.blob.core.windows.net/media/visualwebgui/Media/image_4E54484A.png)

To summarize:

We have learned in this article how to create a basic Visual WebGui Silverlight application.
We have seen how to use the application configuration such as the registration of controls and themes and how to
configure the application package (XAP) structure.
And finely we’ve seen how to deploy or Visual WebGui silverlight application to the server and how to configure the IIS.

You can read the original how to here


(http://www.visualwebgui.com/Community/Resources/QuickStarts/tabid/365/articleType/ArticleView/articleId/400/Developing-
and-deploying-a-Visual-WebGui-Silverlight-application.aspx)

-- Eyal Albert @ Eyal.Albert (at) Gizmox.com

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 13/14
11/1/2021 Visual WebGui Blog - Developing and deploying a Visual WebGui Silverlight application

1 Comment
This is the first grate post about hosting silverlight apps. Thank ya

— Lazar Draganov - Saturday, April 4, 2009 7:49:25 AM (/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-


application#comment-403)

Comments have been disabled for this content.

Terms Of Use (http://www.asp.net/terms-of-use) - Powered by Orchard (http://www.orchardproject.net)

https://weblogs.asp.net/visualwebgui/developing-and-deploying-a-visual-webgui-silverlight-application 14/14

You might also like