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