+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
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 ...
  1. #1

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    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!)

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    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

  3. #3

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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
    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

  4. #4
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    I have no idea on that error, it shouldn't be happening, can you provide a screenshot please

  5. #5

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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

    Error accessing myfiles preview-hap-error.jpg
    Last edited by timpaxton; 6th January 2012 at 01:04 PM. Reason: updated server OS details

  6. #6
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    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

  7. #7

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by nickbro View Post
    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.

  8. #8
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    Can you paste your file types section of the hapconfig.xml file

  9. #9

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    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>

  10. #10
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    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>

  11. #11

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    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" />

  12. #12
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    Can you remove the extra semi-colons that have appeared in the publisher, and powerpoint expressions. Do a CTRL+H for
    Code:
    ;"
    Replace it with
    Code:
    "

  13. Thanks to nickbro from:

    timpaxton (6th January 2012)

  14. #13

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    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!

  15. #14
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,557
    Thank Post
    38
    Thanked 505 Times in 436 Posts
    Rep Power
    114
    Few, I'll have to look at the setup page and try and find why it's putting those extra semi-colons in

  16. #15

    Join Date
    Dec 2006
    Location
    Rotherham
    Posts
    14
    Thank Post
    12
    Thanked 0 Times in 0 Posts
    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:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. MyFiles Preview in HAP7.8
    By enjay in forum Home Access Plus+
    Replies: 24
    Last Post: 6th January 2012, 08:47 AM
  2. Server error - access is denied
    By Gossy in forum Home Access Plus+
    Replies: 2
    Last Post: 27th June 2011, 05:35 PM
  3. 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
  •