Home Access Plus+ Thread, Myfiles error: Index and count must refer to a location within the string in Projects:; When we click on My Files, I get the error below. It seems to be setup correctly since I see ...
-
16th November 2012, 11:30 PM #1
- Rep Power
- 0
Myfiles error: Index and count must refer to a location within the string
When we click on My Files, I get the error below. It seems to be setup correctly since I see the share name and free space in the live tile. We're new to this and are also wondering if it could be related to our active directory setup. We don't get the AD browser, which I've learned is quasi-normal, but even ignoring that and clicking save, we still get a red X on the Base Settings.
Server Error in '/HAP' Application.
Index and count must refer to a location within the string.
Parameter
name: count
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details:
System.ArgumentOutOfRangeException: Index and count must refer to a location
within the string.
Parameter name: count
Source Error:
| Line 119: if (window.location.href.split('#')[1] != "" && window.location.href.split('#')[1]) {Line 120: curpath = window.location.href.split("#")[1];Line 121: if (typeof (window.FileReader) != 'undefined') $("#MyFiles").attr("dropzone", "copy<%=DropZoneAccepted %>");Line 122: if (viewMode == 1) { $("#MyFiles").addClass("details"); $("#MyFilesHeaddings").show(); }Line 123: else if (viewMode == 2) $("#MyFiles").addClass("small"); |
Source
File: e:\inetpub\liveweb.evangel.edu\HAP\MyFiles\Default .aspx Line:
121
Stack Trace:
| [ArgumentOutOfRangeException: Index and count must refer to a location within the string.Parameter name: count] System.String.RemoveInternal(Int32 startIndex, Int32 count) +0 System.String.Remove(Int32 startIndex, Int32 count) +22 HAP.Web.MyFiles.Default.get_DropZoneAccepted() +377 ASP.myfiles_default_aspx.__Render__control46(HtmlT extWriter __w, Control parameterContainer) in e:\inetpub\liveweb.evangel.edu\HAP\MyFiles\Default .aspx:121 System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +109 System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +8 System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter writer) +31 HAP.Web.Controls.CompressJS.Render(HtmlTextWriter writer) +60 System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 ASP.myfiles_default_aspx.__Render__control19(HtmlT extWriter __w, Control parameterContainer) in e:\inetpub\liveweb.evangel.edu\HAP\MyFiles\Default .aspx:77 System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +109 System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +8 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +208 System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter writer) +173 System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter writer) +31 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter output) +53 System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.HtmlControls.HtmlForm.RenderControl( HtmlTextWriter writer) +40 System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +208 System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +8 System.Web.UI.Control.Render(HtmlTextWriter writer) +10 System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +208 System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +8 System.Web.UI.Page.Render(HtmlTextWriter writer) +29 System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +27 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100 System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3060 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.272
-
-
IDG Tech News
-
17th November 2012, 12:17 PM #2 Can you post the filters section of your hapConfig.xml file. The error is stating something is wrong with it.
-
-
17th November 2012, 06:15 PM #3
- Rep Power
- 0

Originally Posted by
nickbro
Can you post the filters section of your hapConfig.xml file. The error is stating something is wrong with it.
Thanks for the quick response. I don't think I've touched anything to do with the filters, but here ya go.
Also note that I do not have any quota servers but still had to manually change the usage mode from "Quota" to "DriveSpace" even though I selected Drive Space in the GUI.
<mscb hideextensions=".lnk,.ini" writechecks="True" LiveAppId="">
<mappings>
<mapping drive="U" name="Staff" enablereadto="All" enablewriteto="All" enablemove="True" usagemode="DriveSpace">\\hoth\staff\%username%</mapping>
</mappings>
<filters>
<filter name="Access Database" expression="*.mdb;*.accdb" enablefor="All" />
<filter name="Excel Documents" expression="*.xls;*.xlsx;*.xlt;*.xltx" enablefor="All" />
<filter name="HTML Files" expression="*.html;*.htm" enablefor="All" />
<filter name="Images" expression="*.jpg;*.gif;*.png;*.bmp;*.jpeg" enablefor="All" />
<filter name="Powerpoint Files" expression="*.ppt;*.pptx;*.pptx;*.ppt;" enablefor="All" />
<filter name="Word Documents" expression="*.doc;*.docx;*.dotx;*.dot;*.txt;*.rft; *.pdf" enablefor="All" />
<filter name="ZIP Files" expression="*.zip" enablefor="All" />
<filter name="All Files" expression="*.*" enablefor="Domain Admins" />
</filters>
<quotaservers />
</mscb>
-
-
17th November 2012, 06:18 PM #4 Ok, this is most odd. Can you try updating the App_LocalResources folder from the HAP+ Web v8.4 Full release, as it may be missing a localized string
-
-
17th November 2012, 06:23 PM #5
- Rep Power
- 0

Originally Posted by
nickbro
Ok, this is most odd. Can you try updating the App_LocalResources folder from the HAP+ Web v8.4 Full release, as it may be missing a localized string
Yeah, the contents of my folder match the 2 files in 8.4. I also tried 8.3 with the same results. The os is en-us, would that make a difference? I wouldn't think so since my xml has en-gb in it.
<hapConfig version="8.4.1114.1700" local="en-GB" firstrun="False">
-
-
17th November 2012, 06:27 PM #6 We'll I'm baffled, it looks like something is playing up generating the drop zone attribute based on the MSCB filters. Does it work on a non admin user?
-
-
17th November 2012, 06:33 PM #7
- Rep Power
- 0
I'm not sure what you mean. I'm logged into my workstation as a non-administrator, and I've logged into HAP+ as both a domain admin and as a regular user with the same results.
Could it be related to the Active Directory configuration? As I mentioned in my original post, I get a red X on Base settings even after putting in a correct user. Is the AD configuration required for basic use?
-
-
17th November 2012, 06:33 PM #8 Ah, yes AD configuration is required, HAP+ ties into AD
-
-
17th November 2012, 06:36 PM #9
- Rep Power
- 0
So is the red X expected or is it possible I've got AD misconfigured?
-
-
17th November 2012, 06:38 PM #10 You may have gotten AD misconfiguration. Since it sounds like it cannot get your membership information. But since you're able to log on it may not be the case
-
-
17th November 2012, 09:10 PM #11
- Rep Power
- 0
If I change the credentials to bogus credentials, I can no longer log in, so it appears that AD is at least partially correct, but I still get the red X with valid creds.
-
-
19th November 2012, 02:18 PM #12
- Rep Power
- 0
Yeap problem is one I had and fixed. The issue is in the following line :
<filter name="Powerpoint Files" expression="*.ppt;*.pptx;*.pptx;*.ppt;" enablefor="All" />
The filter expression ends in a ; so the code is expecting another extension. If you change the line to :
<filter name="Powerpoint Files" expression="*.ppt;*.pptx;*.pptx;*.ppt" enablefor="All" />
Then everything is fine. Not good that the default filters are faulty but hey it's an easy oversight.
So when creating filters ensure that the expression doesn't end in a semicolon.

Originally Posted by
REOScotte
Thanks for the quick response. I don't think I've touched anything to do with the filters, but here ya go.
Also note that I do not have any quota servers but still had to manually change the usage mode from "Quota" to "DriveSpace" even though I selected Drive Space in the GUI.
<mscb hideextensions=".lnk,.ini" writechecks="True" LiveAppId="">
<mappings>
<mapping drive="U" name="Staff" enablereadto="All" enablewriteto="All" enablemove="True" usagemode="DriveSpace">\\hoth\staff\%username%</mapping>
</mappings>
<filters>
<filter name="Access Database" expression="*.mdb;*.accdb" enablefor="All" />
<filter name="Excel Documents" expression="*.xls;*.xlsx;*.xlt;*.xltx" enablefor="All" />
<filter name="HTML Files" expression="*.html;*.htm" enablefor="All" />
<filter name="Images" expression="*.jpg;*.gif;*.png;*.bmp;*.jpeg" enablefor="All" />
<filter name="Powerpoint Files" expression="*.ppt;*.pptx;*.pptx;*.ppt;" enablefor="All" />
<filter name="Word Documents" expression="*.doc;*.docx;*.dotx;*.dot;*.txt;*.rft; *.pdf" enablefor="All" />
<filter name="ZIP Files" expression="*.zip" enablefor="All" />
<filter name="All Files" expression="*.*" enablefor="Domain Admins" />
</filters>
<quotaservers />
</mscb>
-
-
19th November 2012, 04:05 PM #13 Wow, ok that's a bit of a may bad moment, odd that it came out in v8.4 as i added that into the v8.3 release, I'll fix that when I get home, not that it should cause the issue you describe as the system should remove blank/empty extension parts at run time
-
-
19th November 2012, 05:41 PM #14
- Rep Power
- 0
Sweet. That fixed it for me too. This seems to be particular to IIS 6 since we didn't have the same problem on IIS 7.5.
-
-
19th November 2012, 06:21 PM #15
-
SHARE: 
Similar Threads
-
By mrforgetful in forum How do you do....it?
Replies: 4
Last Post: 26th February 2008, 02:56 PM
-
By tosca925 in forum How do you do....it?
Replies: 4
Last Post: 2nd October 2006, 08:15 PM
-
By zmasteruhs in forum Windows
Replies: 3
Last Post: 24th September 2006, 04:18 PM
-
Replies: 19
Last Post: 4th May 2006, 06:49 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules