Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem with codeSubDirectories in web.configProblem with codeSubDirectories in web.config
Previous
 
Next
New Post
6/8/2007 12:31 AM
 

Hi Everyone

I was hoping someone could help me with a problem I seem to be having when I install modules. The problem is to do with the codeSubDirectories element in the web.config.

Let’s take an example, let’s say we have the following three modules

·         Common

·         Setup

·         Routes

When I install these modules the web.config is appended with

<add directoryName="Common"/>
<add directoryName="Setup"/>
<add directoryName="Routes"/>

After installing the above modules the website seems to crash with an error

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'CompaniesController' is not defined.

Source Error:

 

 

Line 75:

Line 76:         Public Function GetCompaniesByUser(ByVal UserID As Integer) As String

Line 77:             Dim ctlCompanies As New CompaniesController

Line 78:             Dim objCompanyInfo As CompanyInfo

Line 79:             Dim arrCompanies As ArrayList


Source File: C:\MyIntranet\App_Code\Common\Globals.vb    Line: 77  

It seems that it can’t find the 'CompaniesController' which is defined in the Setup Module. So having read a few articles on MSDN I thought it may be the order in which the codeSubDirectories are listed.

So I reordered the entries to read as follows

<add directoryName="Setup"/>
<add directoryName="Common"/>
<add directoryName="Routes"/>

The website still crashes with the following error

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'Common' is not a member of 'Modules'.

Source Error:

 

 

Line 57:             Dim UserCompanyList As String = ""

Line 58:

Line 59:             UserCompanyList = MyCompany.Modules.Common.Globals.GetCompaniesByUser(UserID)

Line 60:

Line 61:             If PageIndex = -1 Then


Source File: C:\MyIntranet\App_Code\Setup\Companies\CompanyController.vb    Line: 59

 

From the above I conclude that it is now looking for the function GetCompaniesByUser(UserID) which is in the Common module

Is this a circular dependency issue?

 


Vineet Belani
Director of Technologies
Amazing Computer Solutions Pty Limited
www.amazingsolutions.com.au
www.hospitalmanagementsoftware.com
www.seriousaboutshaadi.com
 
New Post
6/8/2007 10:34 AM
 

What you are illustrating is somewhat of a circular dependency but it is something that is commonly done by developers.  Where 1 project references the other and then there is a secondary reference back.

The issue you are reporting is a "bug" if you will in the splt codebase setup in ASP.NET.  Since you are mixing langages or dividing assemblies out, it parses them one at a time, tries to build it then goes to the next one.  However, if you were explicitly building them you MIGHT be able to build them correctly.  (As you mentioned there might be a circular dependency error that actually exists, otherwise it might just be figuring out the correct build order)

If you want to include a "Common" library, I personally recommend building it as a .dll and simply including it with your modules....it solves this issue.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
6/9/2007 10:56 PM
 

Hi Mitchel

Thanks for responding, Is there a fix for this bug?

Do you know how I can force the ASP.NET complier not to parse the modules one at a time.

By taking out the entries created by DNN in the codeSubDirectories and having nothing listed in there my modules compile properly and there are no errors.

This is getting to be very frustrating because when I have to update a module and I install it using the DNN Install New Module Screen in the module definitions tab. The entry <add directoryName="Setup"/> is automatically added the web.config and so the application crashes and then I have to remote in to the server and delete the entries in the web.config for the application to compile properly.

I either need a way of disabling DNN from adding entries in the web.config or I need to tell ASP.NET compiler not to parse the assemblies one at a time.

Anyone’s help would be greatly appreciated.


Vineet Belani
Director of Technologies
Amazing Computer Solutions Pty Limited
www.amazingsolutions.com.au
www.hospitalmanagementsoftware.com
www.seriousaboutshaadi.com
 
New Post
6/10/2007 10:27 PM
 

Two options. Use WAP compiled modules

Or put all the components in the same module. For example, with IWeb, you can install IWeb then create a "Iweb extension", basically a module that uses Iweb as a base. This works because when you install the  "Iweb extension" it places the modules files INSIDE the IWeb App_Code directory. You cause it to do that by creating an entry like this in the .dnn file:

[app_code]../IWeb/IWebMethods
IWebSurvey.vb

 

the ../ basically tells DotNetNuke to back up one directory and place the file in the IWeb directory.

It's kinda a hack but it works.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem with codeSubDirectories in web.configProblem with codeSubDirectories in web.config


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out