Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...ArgumentOutOfRangeException and hard-coded \portals\ArgumentOutOfRangeException and hard-coded \portals\
Previous
 
Next
New Post
9/2/2007 3:31 PM
 

I just installed 4.5.5 and the install went beautifully.  It seemed to be very tight.  The configuration of my portals went very smoothly as well.  Rather than use the default /Portals/[portalID] directory structure, I opted to customize my home directory.  The tool created new directories on the root of my DNN install without any problems.

After this process, attempted to browse to my newly created portals and a bunch of my modules were blowing up on the default dnn porta landing page.  For example:

Error: Sponsors is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: StartIndex cannot be less than zero. Parameter name: startIndex ---> System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at DotNetNuke.Modules.Html.HtmlModule.ManageUploadDirectory(String strHTML, String strUploadDirectory) at DotNetNuke.Modules.Html.HtmlModule.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

I did a little investigating and another forum post tipped me off as to what might be the cause.  It appears that throughout the DNN application there are hard-coded references to LastIndexOf("\portals\").  Assuming custom home directories are a newly added feature of 4.5.5 this call is obsolete resulting in a fairly critical defect.

The UserControlBase class makes available a public property called PortalSettings which is a reference to a DotNetNuke.Entities.Portals.PortalSettings instance.  This class has a public property called HomeDirectory.  I haven't had a chance to discover what the return value is but it would make sense to me if it was the intended (possibliy customized) home directory of a portal.

So a possible fix might be to use PortalSettings.HomeDirectory in place of the hard-coded "\portals\" string smattered throughout the app.  Does this make sense to anyone but me?

Sincere Regards,

-B

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...ArgumentOutOfRangeException and hard-coded \portals\ArgumentOutOfRangeException and hard-coded \portals\


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out