+ Post New Thread
Results 1 to 15 of 15
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 ...
  1. #1

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    Can you post the filters section of your hapConfig.xml file. The error is stating something is wrong with it.

  3. #3

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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>

  4. #4
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    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

  5. #5

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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">

  6. #6
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    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?

  7. #7

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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?

  8. #8
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    Ah, yes AD configuration is required, HAP+ ties into AD

  9. #9

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    So is the red X expected or is it possible I've got AD misconfigured?

  10. #10
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    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

  11. #11

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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.

  12. #12

    Join Date
    Nov 2012
    Location
    UK
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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.

    Quote Originally Posted by REOScotte View Post
    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>

  13. #13
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    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

  14. #14

    Join Date
    Nov 2012
    Posts
    7
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    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.

  15. #15
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,486
    Thank Post
    37
    Thanked 490 Times in 422 Posts
    Rep Power
    110
    Just checked into codeplex the fix for this one, having a trailing semi-colon will no longer cause this error. Sorry for any issues this may of caused.

    Home Access Plus+ - Source Code

    Fixed: Issue where some empty groups were being shown
    Fixed: Issue where the default page would not generate due to a filter issue
    Added: Logic to rename mscb to my files in the hapConfig xml file
    v8.5 trunk

    Committed by nickbro 1 minute ago. Commit 81210.
    edit
    CHS Extranet/HAP.Web.Config/DriveMappings.cs (View full diff)
    edit
    CHS Extranet/HAP.Web.Config/Filters.cs (View full diff)
    edit
    CHS Extranet/HAP.Web.Config/HAP.Web.Configuration.csproj (View full diff)
    edit
    CHS Extranet/HAP.Web.Config/hapConfig.cs (View full diff)
    delete, source rename
    CHS Extranet/HAP.Web.Config/MyComputer.cs
    rename, edit
    CHS Extranet/HAP.Web.Config/MyFiles.cs (View full diff)
    edit
    CHS Extranet/HAP.Web.Config/Properties/AssemblyInfo.cs (View full diff)
    edit
    CHS Extranet/HAP.Web.Config/QuotaServers.cs (View full diff)
    edit
    CHS Extranet/HAP.Web/Default.aspx.cs (View full diff)
    edit
    CHS Extranet/HAP.Web/MyFiles/Default.aspx.cs (View full diff)
    edit
    CHS Extranet/HAP.Web/MyFiles/Homework.aspx.cs (View full diff)
    edit
    CHS Extranet/HAP.Web/Properties/AssemblyInfo.cs (View full diff)

SHARE:
+ Post New Thread

Similar Threads

  1. Rename and Copy local file to Server
    By mrforgetful in forum How do you do....it?
    Replies: 4
    Last Post: 26th February 2008, 02:56 PM
  2. VB Script ti check for folder and then copy contents to PC
    By tosca925 in forum How do you do....it?
    Replies: 4
    Last Post: 2nd October 2006, 08:15 PM
  3. Replies: 3
    Last Post: 24th September 2006, 04:18 PM
  4. 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
  •