Brockmann: "Creating Rich Web
Applications Gets a Ton Easier"

e-grou chooses Visual WebGui
over standard ASP.NET

Quick migration of VB 6.0
Applications to the Web

Try the revolutionary Studio
the all-new 6.4 beta is here

Fully functional software versions
for 30 days evaluation period

Download the free edition of the
Visual WebGui Studio
 

Tutorials

host posted on April 30, 2009 :: 3401 Views :: User Rating:Article Rating
Share |

The following article was written and contributed by Páll Björnsson

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: 

Create simple application  

 

Step 2 – Add Gizmox references

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 properties 

Gizmox DLL

 

Step 4 – Set your Form1 as the starting form (right clicking on Form1)

Set your 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. 

code

 

Step 5 – Design your form

form design

 

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

web server configuration  

 

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: 

code

Second, you need to add (or make sure it‘s there) the following section within the <WebGui> section. This web.config clause does not exist by default in VisualWebGui standard web.config, so most of the time, you must add it. 

code

Step 8 – Test your application within Visual Studio – run it via F5

run form  

 

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“:

publish application  

 

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

 deployment folder 

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: 

 web config

 

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:

application DLL

  

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:

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:

applicaton folder

  

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:

Convert to Application

  

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:

IIS mapping viewer

  

Which will get you the following listing:

handler mapping

  

Double clicking on the .ashx mapping, you get:

ashx mapping

  

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

request restrictions

 

request restrictions

 

request restrictions

 

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

Step 12 – Check your new application deployed using .ASHX extension

deployed application

  

Final 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

4 Users Rated: Article Rating
# Anonymous
Deploying Visual WebGui web applications with a ASP.NET extension
Posted by Anonymous on Thursday, April 30, 2009 10:37 AM
# arzulfi
Fantastic article for WebGUI Users, solving the deployment puzzle running all the time when adapting an innovative technology like WebGUI. The idea and the technology is really appreciatable.
Posted by arzulfi on Saturday, October 24, 2009 8:25 PM
Only registered users may post comments.
Most promising startups
Top 3 most promising startups in 2009
   AJAX Framework | Web Development | Cloud applications | RIA Development | Silverlight Applications | Legacy Migration
The most popular open source Ajax applications framework for enterprises | Sitemap | Terms Of Use | Privacy Statement
Copyright © 2005-2009 Visual WebGui®    Design By: Template World
   
Visual Studio Partners