Search
 Search
GET THE HOTEST NEWS ABOUT VISUAL WEBGUI.
CREATE LINE OF BUSINESS SILVERLIGHT APPLICATIONS IN NO TIME.
EVERY THING YOU NEED TO START DEVELOPING WITH VISUAL WEBGUI.
SEE VISUAL WEBGUI SHOW CASES FROM AROUND THE WORLD.
ALL THE RESOURCES YOU NEED TO START BUILDING VISUAL WEBGUI APPLICATIONS TODAY.
SHARE AND FIND VISUAL WEBGUI RESOURCES.
TALK WITH OTHER VISUAL WEBGUI DEVELOPERS.
 
Codes

Current Codes | Categories | Search | Syndication

Hosting Visual WebGui Application in DNN based site.  

Published on:  Thursday, November 22, 2007
By:  tamir.zaslavsky
User Rating:  
Categories:   Interopability, Controls, Library

Users have accessed this code article 2812 times.

DNN architecture provides a way to extend your site via DNN modules.

The following code was developed and tested on DNN 03.03.07 (.NET 1.1) and 4.7 (.NET 2.0)

What Are Modules?

Modules provide developers with the ability to extend the functionality of DotNetNuke. DotNetNuke provides a pluggable framework that can be expanded by the development of modules. A module container is provided by DotNetNuke to host a custom module. Modules can be developed in any .NET language, even though DNN is developed in VB.NET, a C# developer can still create a module that plugs into the core framework provided by DNN. This pluggable framework is accomplished by creating compiled private assemblies that expose and utilize interfaces specific to DNN. Once you compile the assembly, and then just create a UI in the form of ascx files that allow your user to interact with your module.
(From http://www.wwwcoder.com/Directory/tabid/68/ctl/Terms/Default.aspx)

We created a DNN module that hosts Visual WebGui Application via FormBox control. Here are instructions to install it:

1.       Download the Attached zip file and unzip it.

2.       Logon to your DNN site with host permission.

3.       Install module Gizmox.WebGUI.DNNHostModule:

Navigate to HostàModule DefinitionsàInstall New Module.  Browse Gizmox.WebGUI.DNNHostModule_01.00.00_Install.zip file, and click the "install new module" link.

4.       Add your own VWG application to the DNN.
You have do it in two way:

4.1.    Manually – add your VWG application assembly (the DLL file) to the bin directory of the DNN application.

4.2.    Create DNN module that do exactly step 4.1. 

Why should you go all the trouble to create DNN module that do that simple task? 

First, maybe you don't have direct access to the file system, or maybe your customers don’t have. Second, this is very simple task!

Create text file with ".dnn" extension with the following content:

<dotnetnuke version="3.0" type="Module">
  <folders>
    <folder>
      <name>YourModuleName</name>
      <version>01.00.00</version>
     <files>
        <file>
          <name>YourVWGApplication.dll</name>
        </file>
      </files>
    </folder>
  </folders>
</dotnetnuke>

for DNN 3.X (.Net 1.1) and DNN 4.X (.Net 2.0) the content above is a bit different.
see VWGSampleAppModule.dnn file inside both VWGSampleAppModule_DOTNET11_01.00.00_Install.zip and VWGSampleAppModule_DOTNET20_01.00.00_Install.zip files

Create a zip file that contains the ".dnn" file and also the YourVWGApplication.dll file. To install your module, repeat step 3 for the zip file you created.
I also added VWGSampleAppModule_DOTNETXX_01.00.00_Install.zip as an example to this step (4.2).

5.       Add "instances" of  Gizmox.WebGUI.DNNHostModule  to the DNN site.

After you install dnn module you can add "instances" of it to the DNN site. Obviously you'll want to add at least one.

6.       Configure VWG:
Like regular VWG application, you'll need to add some configurations the web.config file. Again, like step 4 it can be done in two ways:

6.1.    Manually:
Edit web.config file and add the VWG configuration data.

6.2.    Automatically:

Navigate to page that contains "instance" of  Gizmox.WebGUI.DNNHostModule .

If VWG configuration data is missing in the web.config file, (and it probably is)

The "Edit Global VWG host module configuration" control will appear automatically instead of the control that hosts the VWG Application. You'll probably want to edit the <Applications> element to configure entry point for the VWG application. If you installed my sample module (VWGSampleAppModule_DOTNETXX_01.00.00_Install.zip') then insert  <Application Code="MainForm" Type="VWGSampleApp.MainForm, VWGSampleApp"/> to the <Applications> element.

Don’t forget to click 'update' when you finish. If you want to reconfigure it later, click the "Edit Global VWG host module configuration" link at the bottom of the control that hosts the VWG Application.

7.       Configure each of the "instances" of Gizmox.WebGUI.DNNHostModule you added.
Each instance need to be mapped to a VWG entry point (that was configured via <Application> element in web.config.) .click the "Edit this Form Box" link at the bottom of the control that hosts the VWG Application, again don’t forget to click 'update' when you finish. If used my sample module ('VWGSampleAppModule_DOTNETXX_01.00.00_Install.zip') then enter  MainForm  in the "Form" TextBox

That’s it, Enjoy (:

Tamir Zaslavsky




Note: Codes are submitted as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Terms of Agreement:
By using this code, you agree to the following terms...

  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame.
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Comments
By pennmike @ Sunday, January 06, 2008 10:35 AM
I was unsuccessful at getting this to work. The install errored out on VWGConfiguration.cs, not sure how you got the cs code file to work on DNN being that it's a vb app. Can you help me?

By jpettit @ Friday, February 29, 2008 4:25 PM
I also experienced problems installing via the module package. The problem was with being able to create the folder in the App_Code folder. I was able to get it installed manually by modifying the DNN file, but then get errors from the module instances on pages. Errors are then with VWGConfiguration.cs in being able to find nodes from the web.config.

By mebet @ Thursday, July 31, 2008 9:17 PM
How can i inherits the security from dnn.

By jlam @ Saturday, November 15, 2008 7:20 PM
How can i inherits the security from dnn?



You must be logged in to post a comment. You can login here
Copyright © 2005-2008 Visual WebGui®   Terms Of Use  Privacy Statement
Visual WebGui is copyright 2005-2008 by Gizmox