Hi,
I created one module with 2 ascx files (ViewSuperDirectory.ascx and Registration.ascx). When i open my module it opens correctly viewSuperdirectory is showing. But when i try to navigate ViewSuperDirectory.ascx page to Registration.ascx i am getting following error.
Could Not Load Container: /Portals/_default//dotnetnuke4.6/Portals/_default.ascx
DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled error loading module. ---> System.Web.HttpException: The file '/dotnetnuke4.6/Portals/_default/dotnetnuke4.6/Portals/_default.ascx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(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.LoadContainer(String ContainerPath, Control objPane) --- End of inner exception stack trace ---
This error will come in Host and Admin login only not in User login. For navigation i am using following code:
String strSkinSrc = PortalSettings.ActiveTab.SkinSrc;
String strConSrc = this.ModuleConfiguration.ContainerSrc;
//now we find the paths, and remove the .ascx extention
strSkinSrc = strSkinSrc.Substring(0, strSkinSrc.IndexOf("Skins") - 1).Replace(".ascx", "");
strConSrc = strConSrc.Substring(0, strConSrc.IndexOf("Containers") - 1).Replace(".ascx", "");
strSkinSrc = "?SkinSrc=" + System.Web.HttpUtility.UrlEncode("[G]" + strSkinSrc);
strConSrc = "&ContainerSrc=" + System.Web.HttpUtility.UrlEncode("[G]" + strConSrc);
//finally redirect to the edit page with current skin and container.
Response.Redirect(EditUrl("", "", "Registration") + strSkinSrc + strConSrc);
In the above code "Registration" is key for the Registration.ascx. There is no key for ViewSuperDirectory.ascx. I didn't find the problem.
Can any one please help me how to solve this.