Search KB Filter article types
Deployment of DHTML Visual WebGui application with different extension than the standard .WGX
On various occations it may be necessary to deploy your DHTML Visual WebGui application with different extension than the standard .WGX extension. One such common scenario is when you are deploying to a web-hosting company (like GoDaddy for instance), which is not willing to add the necessary Application Extension (or Handler mapping in IIS7) for allowing deployment with the standard .WGX extension.
Categories: Application Entry Points
Tags: Developers, 1. Beginner, 2. Intermediate, ASP.NET, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
Revision: 3
Posted: 04/Jan/2009
Updated: 12/May/2011
Status: Publish
Types: Walkthrough

Purpose

On various occations it may be necessary to deploy your DHTML Visual WebGui application with different extension than the standard .WGX extension. One such common scenario is when you are deploying to a web-hosting company (like GoDaddy for instance), which is not willing to add the necessary Application Extension (or Handler mapping in IIS7) for allowing deployment with the standard .WGX extension.

In such cases, you can select any of the 18 defined by default ASP.NET extension that are allready defined and associated with the Aspnet_isapi.dll (see support.microsoft.com/kb/815175).

This article will show you the steps needed to deploy a very simple DHTML „Hello world“ application to an IIS7 webserver using the .ASHX extension.

The application created will be a VB.NET application, built in Visual Studio Standard 2008 with VisualWebGui 6.3.6 Professional Studio. For those not using the Professional Studio, the VisualWebGui integration tabs will be unavalable, and I will also go through how to manually change web.config.

Step 1 – Create simple application:Step 2 – Add Gizmox references

In my case I am using VisualWebGui with sources, so I will need to reference all those 6 Gizmox DLL‘s above.

Step 3 – Make sure all the Gizmox DLL‘s are set for Copy Local = True in their propertiesStep 4 – Set your Form1 as the starting form (right clicking on Form1)

This operation serves two purposes. First, it registers your form in web.config. Second it changes the starting form to Form1.wgx in the Web tab in your project properties, setting you will change later to test the .ashx deployment.

For those that do not have this „Set As Start Form“ context menu entry, you need to make sure your <Applications> section of web.config looks ike this.

Step 5 – Design your form

We will keep this application really simple, and just add one single label like the one above.

Step 6 – Set the start page for testing within Visual Studio development web server

We are going to deploy with an .ashx extension, so let‘s set it like that for development testing.

Step 7 – Change the VisualWebGui extension from standard .wgx to .ashx

This needs to be manually changed in web.config in two places. First is the <httphandlers> section:

Next, you need to change the <Extension> tag within the <WebGUI> section:

<WebGUI >
    <!--
        This setting defines the DHTML default extension.
        -->
    <Extension Value=".ashx" />
Step 8 – Test your application within Visual Studio – run it via F5

And it works!

Step 9 – Publish your application

You can get to this step either by Right-Clicking your project and select Publish, or by selecting your project, then go to the Build menu and select „Publish HelloWorld_ASHX“:

In this case I am deploying directly to my inetpub folder, but in case you will be deploying to other hosing companies (like GoDaddy), you might select a temporary folder for this deployment.

Step 10 – Check deployment folder‘s contents

Here you must note that your web.config did not get copied with the publish settings I used in this case, so you will need to copy that manually from your project‘s folder, to the root of the published folder, which should then look like this:

Checking the contents of the bin folder, make sure you‘ve got your application DLL in there as well as all the Gizmox DLL‘s, like this:

Step 11 – Convert your deployment folder to a web application

Open your IIS Manager, here shown on Vista for IIS7, but steps for IIS6 are very similar and can be seen near the bottom of this How-To article here: Developing and deploying a Visual WebGui Silverlight application

You open up IIS Manager:

Then you explode the Sites folder, and then the Default Web Site folder, until you have your new applicaton folder visible as a folder. Then you right click on it and:

On IIS7 you have two types of application pools, Integrated and Classic. For Integrated application pool (the DefaultAppPool) you will need to make additional changes to your web.config file, but as that is not the purpose of this article, we‘ll just change the application pool to Classic, so your „Convert to Application“ screen should look like this:

For standard deployment with the .wgx extension, you would now have to make sure that there was a handler mapping for the .wgx extension, but as we are now deploying with the .ashx extension, a handler mapping for that extension is by default allready defined on your IIS7 server, so no such step is needed here.

In rare cases, the .ASHX handler mapping might have been changed from the default settings, so to make sure that handler is correctly set for VisualWebGui application, you open the handler mappings viewer in IIS manager:

Which will get you the following listing:

Double clicking on the .ashx mapping, you get:

From the Request Restrictions button, you adjust the three tabs like this:

In my default settings, they were all allready set like that.

Step 12 – Check your new application deployed using .ASHX extensionFinal words

Using the .ASHX extention to deploy your applications to web hosting companies, like GoDaddy, will require you to set some additional settings, which will vary between hosting companies. As for GoDaddy specifically, you need to go to Hosting -> Your web site -> Manager -> IIS Settings -> Advanced -> Classic, and then of course you have to remember that your application is accessed via the .ashx extension, as you can see in step 12 above.

Please also note that if you are deploying to remote hosting sites, the long step 11 will be somewhat different, as you will in many cases need to use some kind of FTP uploads to upload your application files to the remote hosting site.

This article was written by Páll Björnsson

About the author

Related Articles

Application Entry Points  
Title Update Author
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
24/May/2010    2010/05/24
Tags: Architects, Developers, C#, VB.NET, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
24/May/2010    2010/05/24
Tags: Architects, Developers, C#, VB.NET, 1. Beginner, 2. Intermediate, 3. Advanced, Integration, Pre v6.3, v6.3, v6.4 and Later
24/May/2010    2010/05/24
Tags: Architects, Developers, 2. Intermediate, 3. Advanced, Customization, ASP.NET, Pre v6.3, v6.3, v6.4 and Later
24/May/2010    2010/05/24
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS