Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
WebHostForAsp.net
 


  Sponsors  

Meet Our Sponsors

Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Subfolders in subfolders for a module
Previous Previous
 
Next Next
New Post 6/11/2008 1:37 PM
Unresolved
User is offline Joshua Beall
110 posts
9th Ranked


Subfolders in subfolders for a module 

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 11:49 AM
User is offline Joshua Beall
110 posts
9th Ranked


Re: Subfolders in subfolders for a module 

Any suggestions on what to do here?

 
New Post 7/10/2008 8:53 PM
User is offline Agung Riyadi
100 posts
9th Ranked


Re: Subfolders in subfolders for a module 

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 12:13 PM
User is offline Joshua Beall
110 posts
9th Ranked


Re: Subfolders in subfolders for a module 

 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/16/2008 11:33 PM
User is offline Agung Riyadi
100 posts
9th Ranked


Re: Subfolders in subfolders for a module 

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Subfolders in subfolders for a module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Integral Hosting | DNN only $14.95/month
Experienced .NET hosting on Windows 2003, ASP.NET 1.1 & 2.0, MSSQL with real technical support.
www.integralhosting.com
Aricie
Aricie is one of the French pioneers and experts in DotNetNuke technology.
www.aricie.com
AFUEGO!
Looking for Free DNN Hosting?
www.AFUEGO.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP