Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Problem with GetCollectionContents
Last Post 07/09/2009 10:32 PM by Arick. 3 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Arick
New Member
New Member
Posts:64


--
07/07/2009 8:36 PM

Hi Peter,

I've been playing with the GetCollectionContents function trying to return a results set into a data table and keep getting the following error every time I try to access the module:

ModuleId: 850
ModuleDefId: 171
FriendlyName: ScalabilityAdoptionAdmin
ModuleControlSource: DesktopModules/DA_ScalabilityAdoptionAdmin/ViewAdoptionModules1.ascx
AssemblyVersion: 04.08.04
PortalID: 0
PortalName: My Website
UserID: 1
UserName: host
ActiveTabID: 266
ActiveTabName: Adoption Administration
RawURL: /AdoptionAdministration/tabid/266/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 994e0721-1f50-4b60-8ea8-c360fec46173
InnerException: c:\inetpub\DAIntranet\Website\DesktopModules\DA_ScalabilityAdoptionAdmin\ViewAdoptionModules1.ascx.cs(364): error CS1502: The best overloaded method match for 'Bring2mind.DNN.Modules.DMX.Business.EntriesController.GetCollectionContents(ref DotNetNuke.Entities.Portals.PortalSettings, ref DotNetNuke.Entities.Users.UserInfo, bool, int, bool)' has some invalid arguments
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Compilation.BuildManager.CompileWebFile
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: c:\inetpub\DAIntranet\Website\DesktopModules\DA_ScalabilityAdoptionAdmin\ViewAdoptionModules1.ascx.cs(364): error CS1502: The best overloaded method match for 'Bring2mind.DNN.Modules.DMX.Business.EntriesController.GetCollectionContents(ref DotNetNuke.Entities.Portals.PortalSettings, ref DotNetNuke.Entities.Users.UserInfo, bool, int, bool)' has some invalid arguments ---> System.Web.HttpCompileException: c:\inetpub\DAIntranet\Website\DesktopModules\DA_ScalabilityAdoptionAdmin\ViewAdoptionModules1.ascx.cs(364): error CS1502: The best overloaded method match for 'Bring2mind.DNN.Modules.DMX.Business.EntriesController.GetCollectionContents(ref DotNetNuke.Entities.Portals.PortalSettings, ref DotNetNuke.Entities.Users.UserInfo, bool, int, bool)' has some invalid arguments at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---

The module extends PortalModuleBase and here is the line of code that is being referenced as invalid: DataTable dt = EntriesController.GetCollectionContents(PortalSettings, UserInfo, false, Convert.ToInt32(ei4.CollectionId), false); 

All values contain valid data so I'm not sure what if anything I am missing here.  Any assistance would be appreciated. 

Thanks,

-Arick

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
07/08/2009 8:52 PM
Hi Arick,

The error itself is a new phrase for me. I can't see whether it is saying there is some internal error in the method, or if you have some parameter incompatibility. I guess you're using the very same DMX.Core.dll that is in the DNN bin directory to reflect against in your project, right? Then the variable types should be fine or VS wouldn't compile. The parameters are pretty self-explanatory. You are using VS to build this project, correct?

Peter
Arick
New Member
New Member
Posts:64


--
07/08/2009 10:14 PM
Peter,

Yes you are correct on all accounts.

-Arick
Arick
New Member
New Member
Posts:64


--
07/09/2009 10:32 PM
Hi Peter,

I wanted to follow up on this, after some playing around it turned out the entire problem was all on my end, and the way C# was dealing with the local variables. Thank you for taking the time to look into this for me.

-Arick
You are not authorized to post a reply.