Home Access Plus+ Thread, Error accessing myfiles preview in Projects:; Hi @ nickbro
I had the MyFiles preview working in HAP+ 7.7, but since I've upgraded to 7.8 I'm getting ...
-
5th January 2012, 03:17 PM #1
- Rep Power
- 0
Error accessing myfiles preview
Hi @nickbro
I had the MyFiles preview working in HAP+ 7.7, but since I've upgraded to 7.8 I'm getting an error. This is my first HAP+ error, so go easy on me debugging it, I'm a newby!
I've deleted all the HAP folder and recreated it out of the latest HAP+ Web v7.8.1211.1640.zip file, replacing my copy of the web.config and App_Data\hapconfig.xml files. Still no dice.
Can you point me in the right direction to try and sort this?
Thanks, Tim.
The error is below:
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 84: if (window.location.href.split('#')[1] != "" && window.location.href.split('#')[1]) {
Line 85: curpath = window.location.href.split("#")[1]
Line 86: if (typeof (window.FileReader) != 'undefined') $("#MyFiles").attr("dropzone", "copy<%=DropZoneAccepted %>");
Line 87: if (viewMode == 1) { $("#MyFiles").addClass("details"); $("#MyFilesHeaddings").show(); }
Line 88: else if (viewMode == 2) $("#MyFiles").addClass("small");
Source File: c:\inetpub\wwwroot\hap\MyFiles\Default.aspx Line: 86
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
HAP.Web.MyFiles.Default.get_DropZoneAccepted() +448
ASP.myfiles_default_aspx.__Render__control3(HtmlTe xtWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\hap\MyFiles\Default.aspx:86
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +131
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +246
System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter writer) +315
System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter writer) +48
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +246
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +246
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290
Last edited by timpaxton; 5th January 2012 at 03:31 PM.
Reason: linked to nickbro (hopefully!)
-
-
IDG Tech News
-
5th January 2012, 09:49 PM #2 Try Home Access Plus+ - Download: v7.9 and see if it fixes it, one of the early v7.9 updates (back in dec) was to fix an issue with the Preview functionality
-
-
6th January 2012, 08:26 AM #3
- Rep Power
- 0

Originally Posted by
nickbro
Hi again Nick. I've installed 7.9 (by entirely deleting the hap directory except ./hap/App_Data/hapconfig.xml), and used the web.config from the 7.9 zip, but modified to my requirements.
I'm now getting a different error - it seems to me as a layman I've not got a variable set somewhere, should I be re-creating the hapconfig.xml file?
Cheers,
Tim.
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 105: if (window.location.href.split('#')[1] != "" && window.location.href.split('#')[1]) {
Line 106: curpath = window.location.href.split("#")[1]
Line 107: if (typeof (window.FileReader) != 'undefined') $("#MyFiles").attr("dropzone", "copy<%=DropZoneAccepted %>");
Line 108: if (viewMode == 1) { $("#MyFiles").addClass("details"); $("#MyFilesHeaddings").show(); }
Line 109: else if (viewMode == 2) $("#MyFiles").addClass("small");
Source File: c:\inetpub\wwwroot\hap\MyFiles\Default.aspx Line: 107
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
HAP.Web.MyFiles.Default.get_DropZoneAccepted() +448
ASP.myfiles_default_aspx.__Render__control32(HtmlT extWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\hap\MyFiles\Default.aspx:107
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +131
System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter writer) +48
ASP.myfiles_default_aspx.__Render__control3(HtmlTe xtWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Te mporary ASP.NET Files\hap\55cd546f\70e6ba5a\App_Web_gbs4mq4u.1.cs: 0
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +131
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +246
System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter writer) +315
System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter writer) +48
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +246
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +246
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290
-
-
6th January 2012, 12:50 PM #4 I have no idea on that error, it shouldn't be happening, can you provide a screenshot please
-
-
6th January 2012, 01:03 PM #5
- Rep Power
- 0

Originally Posted by
nickbro
I have no idea on that error, it shouldn't be happening, can you provide a screenshot please
Oh dear! Screenshot attached. On a side note, the stock Web.config doesn't like adding the .svg mime type, and I've commented it out like this:
Code:
<!--<mimeMap fileExtension=".svg" mimeType="http://www.edugeek.net/images/svg+xml" />-->
If I don't do that, I can't access the stylesheets, scripts or images. Is this critical?
I'm on IIS 7.5 on Server 2008R2 Datacentre
Last edited by timpaxton; 6th January 2012 at 01:04 PM.
Reason: updated server OS details
-
-
6th January 2012, 01:18 PM #6 ok, that error has something to do you your Accepted File Types, double check they are correct, post them here if you could so I can have a gander at them
-
-
6th January 2012, 02:50 PM #7
- Rep Power
- 0

Originally Posted by
nickbro
ok, that error has something to do you your Accepted File Types, double check they are correct, post them here if you could so I can have a gander at them
Hi again Nick.
I've fixed the extension problem by doing
Code:
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="images/svg+xml" />
Like has been done further down for the .eot file type.
It's not fixed my MyFiles problem though, still the same error as before.
-
-
6th January 2012, 02:52 PM #8 Can you paste your file types section of the hapconfig.xml file
-
-
6th January 2012, 02:56 PM #9
- Rep Power
- 0
Here you go:
Code:
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="App_Data" />
<remove segment="App_WebReferences" />
<remove segment="App_LocalResources" />
<remove segment="App_GlobalResources" />
<remove segment="App_code" />
<remove segment="bin" />
<remove segment="web.config" />
<remove segment="App_Browsers" />
</hiddenSegments>
<fileExtensions>
<remove fileExtension=".vsdisco" />
<remove fileExtension=".sdmDocument" />
<remove fileExtension=".sdm" />
<remove fileExtension=".sd" />
<remove fileExtension=".refresh" />
<remove fileExtension=".msgx" />
<remove fileExtension=".mdf" />
<remove fileExtension=".lsaprototype" />
<remove fileExtension=".ldf" />
<remove fileExtension=".lddprototype" />
<remove fileExtension=".ldd" />
<remove fileExtension=".exclude" />
<remove fileExtension=".dsprototype" />
<remove fileExtension=".dd" />
<remove fileExtension=".compiled" />
<remove fileExtension=".cd" />
<remove fileExtension=".adprototype" />
<remove fileExtension=".ad" />
<remove fileExtension=".ssmap" />
<remove fileExtension=".ssdgm" />
<remove fileExtension=".dsdgm" />
<remove fileExtension=".ldb" />
<remove fileExtension=".jsl" />
<remove fileExtension=".java" />
<remove fileExtension=".vjsproj" />
<remove fileExtension=".mdb" />
<remove fileExtension=".resources" />
<remove fileExtension=".resx" />
<remove fileExtension=".licx" />
<remove fileExtension=".webinfo" />
<remove fileExtension=".vbproj" />
<remove fileExtension=".vb" />
<remove fileExtension=".csproj" />
<remove fileExtension=".skin" />
<remove fileExtension=".ascx" />
<remove fileExtension=".master" />
<remove fileExtension=".browser" />
<remove fileExtension=".sitemap" />
<remove fileExtension=".cs" />
<remove fileExtension=".lsad" />
<remove fileExtension=".asax" />
<remove fileExtension=".config" />
</fileExtensions>
</requestFiltering>
</security>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".m4v" mimeType="video/m4v" />
<mimeMap fileExtension=".ogg" mimeType="video/ogg" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".spx" mimeType="audio/ogg" />
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="http://www.edugeek.net/images/svg+xml" />
<mimeMap fileExtension=".svgz" mimeType="http://www.edugeek.net/images/svg+xml" />
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".otf" mimeType="font/otf" />
<mimeMap fileExtension=".woff" mimeType="font/x-woff" />
</staticContent>
<handlers>
-
-
6th January 2012, 02:57 PM #10 Sorry, I meant the filters section from the hapconfig.xml file
HTML Code:
<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="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>
-
-
6th January 2012, 03:00 PM #11
- Rep Power
- 0
My apologies, I mis-read that.
Here you go:
Code:
<filter name="Access Database" expression="*.mdb;*.accdb" enablefor="All" />
<filter name="Excel Documents" expression="*.xls;*.xlsx;*.xlt;*.xltx" enablefor="All" />
<filter name="PowerPoint Documents" expression="*.ppt;*.pps;*.pptx;" enablefor="All" />
<filter name="Publisher Documents" expression="*.pub;" enablefor="All" />
<filter name="HTML Files" expression="*.html;*.htm" enablefor="All" />
<filter name="Images" expression="*.jpg;*.gif;*.png;*.bmp;*.jpeg" 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" />
-
-
6th January 2012, 03:03 PM #12 Can you remove the extra semi-colons that have appeared in the publisher, and powerpoint expressions. Do a CTRL+H for
Replace it with
-
Thanks to nickbro from:
timpaxton (6th January 2012)
-
6th January 2012, 03:07 PM #13
- Rep Power
- 0
That's it, I've got a problem with my quotaserver config now, but I'm not getting the exception any more. Thanks!
-
-
6th January 2012, 03:08 PM #14 Few, I'll have to look at the setup page and try and find why it's putting those extra semi-colons in
-
-
6th January 2012, 03:10 PM #15
- Rep Power
- 0
I manually hacked that Nick, so don't worry, your setup page is probably fine, I'm just not a very elegant hacker
-
SHARE: 
Similar Threads
-
By enjay in forum Home Access Plus+
Replies: 24
Last Post: 6th January 2012, 08:47 AM
-
By Gossy in forum Home Access Plus+
Replies: 2
Last Post: 27th June 2011, 05:35 PM
-
By burgemaster in forum Windows
Replies: 4
Last Post: 2nd July 2009, 03:48 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
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