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.0Subfolders in subfolders for a moduleSubfolders in subfolders for a module
Previous
 
Next
New Post
6/11/2008 4:37 PM
 

Hi All,

I've developed a module that has a subfolder in a subfolder.  The module controls are in DesktopModules/Hslda/Quiz, and the class files are in App_Code/Hslda/Quiz.

This worked fine during development, but upon packaging up my module and attempting to deploy it to another site, I've run into a few problems:

1) DNN, upon installation, seemed to turn Hslda/Quiz into Hslda_Quiz, and now it can't find my user controls.  Here's a sample error: DotNetNuke.Services.Exceptions.ModuleLoadException: The file '/dnn/DesktopModules/HSLDA_Quiz/Quiz.ascx' does not exist.

2) It is inserting the following into the web.config:
      <codeSubDirectories>
        <add directoryName="Hslda/Quiz" />
      </codeSubDirectories>

This is not valid, only immediate subdirectories of App_Code (in this case, Hslda) are valid.  Changing it to this:

      <codeSubDirectories>
        <add directoryName="Hslda" />
      </codeSubDirectories>

Fixes the problem.  But I'd rather not that installing my module completely breaks the site, and I have to manually edit the web.config file to fix it!

My module is written in C#, and at this point I am not precompiling it.

So, what should I do?  Are nested subfolders simply not supported for module development, and I should move from "Hslda/Quiz" to "HsldaQuiz" (a single folder deep)?

My module name is HSLDA_Quiz, and the manifest file is HSLDA_Quiz.dnn.  Here it is in it's entirety:

<dotnetnuke version="3.0" type="Module">
  <folders>
    <folder>
      <name>HSLDA_Quiz</name>
      <friendlyname>HSLDA Quiz</friendlyname>
      <foldername>Hslda/Quiz</foldername>
      <modulename>HSLDA_Quiz</modulename>
      <description>Quiz module for displaying a multiple choice quiz</description>
      <version>01.00.00</version>
      <businesscontrollerclass>HSLDA.Web.DotNetNuke.Modules.Quiz.QuizController</businesscontrollerclass>
      <modules>
        <module>
          <friendlyname>HSLDA Quiz</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <src>Quiz.ascx</src>
              <type>View</type>
            </control>
            <control>
              <key>Edit</key>
              <title>Edit Quiz</title>
              <src>EditQuiz.ascx</src>
              <type>Edit</type>
            </control>
            <control>
              <key>Settings</key>
              <title>Quiz Settings</title>
              <src>Settings.ascx</src>
              <type>Edit</type>
            </control>
            <control>
              <key>ViewGrades</key>
              <title>View Grades</title>
              <src>QuizGrades.ascx</src>
              <type>Edit</type>
            </control>
          </controls>
        </module>
      </modules>
      <files>
        <file>
          <path>Providers\DataProvider\SqlDataProvider</path>
          <name>01.00.00.SqlDataProvider</name>
        </file>
        <file>
          <path></path>
          <name>EditQuestion.ascx</name>
        </file>
        <file>
          <path></path>
          <name>EditQuestion.ascx.cs</name>
        </file>
        <file>
          <path></path>
          <name>EditQuiz.ascx</name>
        </file>
        <file>
          <path></path>
          <name>EditQuiz.ascx.cs</name>
        </file>
        <file>
          <path></path>
          <name>Quiz.ascx</name>
        </file>
        <file>
          <path></path>
          <name>Quiz.ascx.cs</name>
        </file>
        <file>
          <path></path>
          <name>QuizGrades.ascx</name>
        </file>
        <file>
          <path></path>
          <name>QuizGrades.ascx.cs</name>
        </file>
        <file>
          <path></path>
          <name>QuizQuestion.ascx</name>
        </file>
        <file>
          <path></path>
          <name>QuizQuestion.ascx.cs</name>
        </file>
        <file>
          <path></path>
          <name>Settings.ascx</name>
        </file>
        <file>
          <path></path>
          <name>Settings.ascx.cs</name>
        </file>
        <file>
          <path></path>
          <name>Uninstall.SqlDataProvider</name>
        </file>
        <file>
          <path>[app_code]Providers\DataProviders\SqlDataProvider</path>
          <name>SqlDataProvider.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>DataProvider.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>QuestionAnswerData.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>QuestionData.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>QuizAttemptData.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>QuizController.cs</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>QuizData.cs</name>
        </file>
      </files>
    </folder>
  </folders>
</dotnetnuke>

  -Josh

 
New Post
7/9/2008 2:49 PM
 

Any suggestions on what to do here?

 
New Post
7/10/2008 11:53 PM
 

I think you should using Web Application Project (WAP). Trying to work with App_Code for real application and solution is not recomended. That's my personal opinion.

I work with App_Code only for POC (proof of concept) or maybe for doing some research and playing with some scenario that only in development. If it works, i usually switch to WAP model to make it real in production. But again, that's my personal opinion.

Try to change your development model to WAP model. That's my suggestion.

HTH.

 
New Post
7/16/2008 3:13 PM
 

Agung Riyadi wrote

I think you should using Web Application Project (WAP). Trying to work with App_Code for real application and solution is not recomended. That's my personal opinion.

I work with App_Code only for POC (proof of concept) or maybe for doing some research and playing with some scenario that only in development. If it works, i usually switch to WAP model to make it real in production. But again, that's my personal opinion.

Try to change your development model to WAP model. That's my suggestion.

Would that address only the files in the App_Code folder, or would it also address the problem with the user controls in the DesktopModules folder?

 
New Post
7/17/2008 2:33 AM
 

If you work with App_Code model, then everytime you want to create a module then you should create two folders with same name both are in DesktopModules and also in App_Code folder. And if you want to compile it into assembly with precompilation, then you will get some strange name (not usefull name).

Or maybe you can see Michael Washington's tutorial about deploying module if you use App_Code model here : http://www.adefwebserver.com/DotNetNukeHELP/DNN_PackageModule/Default.htm

You can also use Rick Strahl's tool here : http://www.west-wind.com/tools/aspnetcompiler.asp

HTH.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Subfolders in subfolders for a moduleSubfolders in subfolders for a module


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