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
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Module is one step closer to working, getting System.Argument Exception
Previous Previous
 
Next Next
New Post 3/31/2008 12:17 PM
User is offline joe333
11 posts
10th Ranked


Module is one step closer to working, getting System.Argument Exception 

I am going to get this page working if it 's the last thing i do!!!

 

So NOW I put my code in the module, via Visual Studio, to do what I want it to do.  I saved it and now I get the error.  I'll keep looking, but if any of you experienced folk can point me in the appropriate direction, I'd appreciate it!

 

Thanks!

 

AssemblyVersion: 04.04.00
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL: /website/tabid/166/default.aspx
AbsoluteURL: /website/Default.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 154f53a5-1bb0-42f8-a27d-147f716260f6
InnerException: An item with the same key has already been added.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.ThrowHelper.ThrowArgumentException
StackTrace:
Message: System.ArgumentException: An item with the same key has already been added.at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)at DotNetNuke.Entities.Modules.ModuleController.FillModuleInfoDictionary(IDataReader dr)
Source:

 
New Post 4/22/2008 2:55 AM
User is offline Willem
12 posts
10th Ranked


Re: Module is one step closer to working, getting System.Argument Exception 

Same here (v4.8.2) after adding my module....
Unfortunally not solution yet.

 
New Post 4/22/2008 3:48 AM
User is offline Willem
12 posts
10th Ranked


Re: Module is one step closer to working, getting System.Argument Exception 

Have you found any solution to this problem?
It seems to me that the framework executes the GetTabModules stored procedure and tries to build up a dictionary with ModuleInfo's.
Unfortunally, GetTabModules not onlyt returns the modules, but also the controls per module.

I've got a module with multiple controls, so GetTabModules retrieves multiple records for one module.
Because the ModuleId is used as the key in the dictionary it fails.....
Still no solution though.

From GetTabModules:

//Get modules form Database
modules = FillModuleInfoDictionary(DataProvider.Instance().GetTabModules(TabId));

From FillModuleInfoDictionary:

 private Dictionary<int, ModuleInfo> FillModuleInfoDictionary(IDataReader dr)
        {
            Dictionary<int, ModuleInfo> dic = new Dictionary<int, ModuleInfo>();
            try
            {
                while (dr.Read())
                {
                    // fill business object
                    ModuleInfo obj = FillModuleInfo(dr, false, true);
                    // add to dictionary
                    dic.Add(obj.ModuleID, obj);
                }

 
New Post 4/22/2008 4:09 AM
User is offline Willem
12 posts
10th Ranked


Re: Module is one step closer to working, getting System.Argument Exception 

Workaround: remove all but one control from your ModuleDefinition (I only needed one, because I use an usercontrol injector)

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Module is one step closer to working, getting System.Argument Exception
 


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.

 


Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com
PointClick.Net DNN Solutions
DotNetNuke Hosting Platform for Business and personal use.
PointClick.Net Hosted Solutions

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