Search KB Filter article types
Configuring
Categories: Configuration
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
Revision: 1
Posted: 23/July/2009
Updated: 04/Dec/2010
Status: Publish
Types: Reference

This article needs more work to complete.


Visual WebGui integration and Configuring Visual WebGui application
GeneralVisual WebGui intgegration

When talking about the Visual WebGui integration, we are actually talking about three different groups of integrations.

Integration tabs

First part of the integration are the Integration tabs. You will find the Integration tabs in your project's properties, as can be seen in The new Visual WebGui integration to Visual Studio. Starting with Visual WebGui version 6.3, the integration tabs are only available in the Professional Studio.

The main purpose of the integration tabs, is to provide an easy interface to the various Web.Config settings that you might have to set specially for your Visual WebGui application. This is however just an inteface to settings you can set manually by editing web.config directly.

Project templates

Second part of the integration are the project templates for the various types of Visual WebGui C# and VB.NET projects you can create. Starting with Visual WebGui version 6.3, the project templates are only available in the Professional Studio.

Designer support

The Visual WebGui designer, provides a Windows Forms like GUI interface for editing of Forms and UserControls. Starting with Visual WebGui version 6.3, designer is available in Professional Studio and Express Studio, but not in the SDK version.

See alsoWeb.Config without Visual WebGui integration

You can easily maintain your application settings without the Visual WebGui intgegration, by editing web.config by hand. Default web.config is created from the project templates, supplied with Professional Studio, and in case you do not have it, you can always grab a web.config file from another Visual WebGui application, and use it as a template. If all else fails, you can download the sources for the Catalog sample application and grap a web.config from there.

The default web.config file has comments that are usually enough to know how to change it. As an extra help, then you will find the corresponding web.config setting for every integration setting referenced in this section of this article.

Preventing Web.Config inheritance

Many sections in web.config are subject to inheritance. The inheritance chain starts at your server's machine.config and the inheritance chain goes on all the way to the web.config on your application's virtual folder. The inheritance chain is calculated from the construction of virtual folders and subfolders, not physical folder structure (see MSDN article - section Conflicts Between settings on Virtual and Physical directories).

The web.config inheritance is usually not a problem for normal Visual WebGui applications, but in some cases it is. As an example, take Visual WebGui application appA, which has a subfolder declared as a virtual folder where you deploy appB, another Visual WebGui application. The addresses for those applications would be http://mydomain/appA/Form1.wgx and http://myDomain/appA/appB/Form1.wgx. Normally, you would choose to have your "normal" web.config file in each of the virtual folders for appA and appB.

The problem with unchanged web.config files in this case is that appB will inherit many of the web.config sections included in appA and you will get configuration errors on many of them if you leave them unchanged.

There are two possible solutions to this problem. First, you can simply remove all the "duplicated" settings from appB's web.config and rely on they being inherited from appA. This will work for some sections, but not others. The other option is to add directives in appA's web.config to state that they only apply to appA, and should not be inherited to subfolders and thereby not inherited by appB on a virtual subfolder. For this, you use the <location> web.config tag.

The <location> tag is a wrapper you can use to wrap many (not all) of the web.config sections and thereby state where they should apply. In the case of preventing inheritance in our context here, you would wrap the relevant section of web.config in appA's web.config, and then leave appB's web.config unchanged. The syntax of the tag is

<location path ="." inheritInChildApplications="false">
    <system.web>
    ......
    </system.web>
</location>
 
<location path ="." inheritInChildApplications="false">
    <WebGUI>
    ......
    </WebGUI>
</location>

There is also a third option, which requires you to change appB's web.config. This method requires more work on your behalf, and if not executed correctly, will introduce further problems. If you view the web.config secions, you will notice that some are a simple flags that are set one way or the other. Other sections use <add...> to add settings and these are the sections that you get configuration errors for on appB, when it's adding keys that have already been added in appA.

All the sections that do support or use <add...>, they also support <clear ..> and <remove ...> tags. By starting all those sections in appB's web.config with <clear />, you will remove everything from that section before you start adding yours. This is not always safe to use, as some "keys" might be inherited from higher level than appA. It is therefore more safe to use <remove ...> on specific "keys", if you want to use this third method.

Using the <location ..> tag is the most convenient and least error phrone way of handling web.config inheritance issues.

Configuration Settings

In this section you will find most of the application settings that are directly relevant for your Visual WegGUI application. The settings are sectioned into groups where some are standard to Visual Studio without Visual WebGui being involved, but are relevant to your Visual WebGui application nontheless.

Adjusting the settings of your application in Express Studio or SDK version lacks the Visual WebGui integration and can only be set by manually editing web.config. For each integration setting mentioned in this article, the equivialent web.config setting will be shown, so it should be relatively easy to map between the two.

You should also take a look at the References section for forum discussions and links to further information.

See alsoSDK Version highlightsReferencesForum discussionsIssue trackerOther references

About the author

Related Articles

Configuration  
Title Update Author
Visual WebGui version 6.2 features complete integration into the Microsoft Visual Studio development system, a consolidated installation process, and the opportunity to use Microsoft Visual Studio Express Editions for software evaluation and trials. Attend this webcast to learn how the Visual WebGui...
Tags: Developers, Visual WebGui Pipeline, Visual Studio, 1. Beginner, 2. Intermediate, 3. Advanced, Integration, Pre v6.3, v6.3, v6.4 and Later
11/Jan/2008    2008/01/11
Tags: Developers, 2. Intermediate, 3. Advanced, Customization, WCF, Pre v6.3, v6.3, v6.4 and Later
06/Jan/2009    2009/01/06
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
29/Oct/2010    2010/10/29
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
23/July/2010    2010/07/23
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
23/July/2010    2010/07/23
Tags: Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
23/July/2010    2010/07/23
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS