Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted (edited)

We're running version 8 (HAP+ Web v8.0.0901.1830) and when I try to drag (ie "Move") a file to a sub-folder it asks me answer OK to "Are you sure you want to move:". It then hangs until I close the dialog box. The file does not move.

 

This is not a rights issue as I've been attempting to move within a folder structure where the user has full control (user's home drive). I also tried it as Administrator Equivalent just to be sure of this. Here's the home drive entry from the hapconfig.xml file for the folder that I was trying to do this in:

 

%homedir%

 

And, as I just discovered, "file Copy" does not seem to work either. It just hangs with the message on-screen

 

Thanks

Edited by peterdwyer
Posted

I hope this is what you're looking for. Your instructions say "Click on the XML/JSON tab" but I can't find anything that says that. If I'm wrong, please tell me where to look

 

Thanks

 

This is from the "Response" tab for the Post

 

 

404 - File or directory not found.

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

 

 

And Here's a Second Attempt

 

404 - File or directory not found.

404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Posted

Hmmm. It came up with:

[h=2]404 - File or directory not found.[/h]

[h=3]The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.[/h]

Posted

Ok something is wrong with your hap install.

 

/hap/api/myfiles/help

 

should give you something like this:

 

Operations at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles

This page describes the service operations at this endpoint.













































































Uri Method Description
{Drive}/{*Path} GET Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/{DRIVE}/{PATH}
Copy POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Copy
Delete POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Delete
Drives GET Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Drives
Exists/{Drive}/{*Path} GET Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Exists/{DRIVE}/{PATH}
info/{Drive}/{*Path} GET Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/info/{DRIVE}/{PATH}
Move POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Move
New/{Drive}/{*Path} POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/New/{DRIVE}/{PATH}
Preview/{Drive}/{*Path} GET Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Preview/{DRIVE}/{PATH}
Properties/{Drive}/{*Path} GET Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Properties/{DRIVE}/{PATH}
SendTo/Google/{Drive}/{*Path} POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/SendTo/Google/{DRIVE}/{PATH}
SendTo/SkyDrive/{Drive}/{*Path} POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/SendTo/SkyDrive/{DRIVE}/{PATH}
Unzip POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Unzip
Zip POST Service at https://folders.crickhowell-hs.powys.sch.uk/hap/api/myfiles/Zip
Posted

Thanks for your reply.

 

Now I'm confused. We were previously running version 7.10 and the installation instructions for upgrading to version 8 read: "To upgrade from a previous version, delete everything but your AppData folder, extract all but the AppData folder and run your HAP+ install"

 

There was no API folder in the distribution ZIP file (just downloaded it again in case I missed it), so where does it come from? And there is no /MyFiles/api/MyFiles/help folder (referring to your previous advice) beneath the root folder of hap. It stops at hap/MyFiles (which contains only 3 files)

 

The url folder that you referred to in an earier message (./hap/MyFiles/api/MyFiles/help) simply doesn't exist

 

I thought I'd set everything up correctly according to the instructions when I installed HAP. After copying over the files, I ran the setup and everything registered properly, and the system has been running more or less smoothly for a couple of months. And I've added in some of the "extras" such as "Uptime Live Tiles" without skipping a beat.

 

There must be something I missed in the setup if these folders are missing. Is there anything you can think of that I might have missed in setup?

 

Thanks

Posted

The folder and files don't exist, it's a virtual path that maps to some code to run.

 

This is very odd that the API calls aren't working. The help page should load in the browser. If it isn't then something may be wrong with the HAP.MyFiles.dll

Posted

Thanks for your reply.

 

If it works for you, but not me, perhaps it means that might mean that my HAP.MyFiles.dll might be corrupt. Would it do any good to copy the original distribution file over the copy in the bin folder?

 

Thanks

Posted

Not wanting to "fry" my production copy of HAP, I did the following in my test environment, which is an exact mirror of the production environment:

. Replaced entire contents of the hap/bin folder with the files from the initial distribution (HAP+ Web v8.0828.1800)

. Re-ran the setup (just in case)

. Refreshed browser and started up a HAP session

. Tried to do file "copy" (using menus) and "move" (using drag and drop).... both attempts hung

 

Thanks

Posted

Ok, bug found and fixed:

 

Open ~/myfiles/default.aspx

 

Search for

hap.common.resolveUrl('api/MyFiles/Move')

Replace it with

hap.common.resolveUrl('~/api/MyFiles/Move')

Posted

Thanks for your reply,

 

I made the changes that you suggested but still could not get Move or Copy working. I have attached a text file that contains:

 

  • What I could capture from Firebug
  • The "offending" line #146 referred to in the error message
  • Fragments from the relevant sections of hap/MyFiles/Default.aspx, changed as requested. There are two

 

Just a thought (and I know nothing about this so please ignore me if wrong). I Googled the "400 An WCF Error has Occured" and it seemed to refer to messages over a specific default size (64K). I notice that the attached text file is 76K in size, most of it being the "offending" line #146. What I saw seemed to involved increasing a parameter in web.config. As I said I could be barking up the wrong tree

 

Thanks

hap_20121002.txt

Posted

Firstly, thanks for your quick response. You aren't gonna like this... I still have the same problem

 

I downloaded the file named "HAP+ Web Upgrade (from v8.0)", unzipped, and copied the files to my "test system" as follows:

. 3 files in the root folder of the zip to the root of /hap

. Files in /bin to /hap/bin

. Files in /style to /hap/style

 

I then ran the setup again and... tried to do a move/copy. Firebug showed the following:

8:33:36.810 - Dynatree._create(): version='

 

 

$Version: 1.2.0$

 

 

', debugLevel=

 

 

1

 

 

.

 

 

jquery...tree.js (line 52)

POST https://10.9.8.210/hap2/api/MyFiles/Move?%222012-10-02T22:33:48.944Z%22

 

400 An WCF Error has Occured

62ms

jquery....min.js (line 11)

ParamsHeadersPostResponseXMLJSONCookies

 

 

{"Message":"The given key was not present in the dictionary.","Detail":null,"FaultType":"KeyNotFoundException"}

 

 

TypeError: xhr.responseXML.documentElement.children[1] is undefined

[break On This Error]

 

 

...electedItems()[0].Data.Extension != ".doc" && SelectedItems()[0].Data.Extension ...

 

 

#G\uploads (line 146)

 

I did keep that change in /hap/myfiles/default.aspx that you previously recommended: hap.common.resolveUrl('~/api/MyFiles/Move') - don't know if I should have.... or should I set it back?

 

Thanks

Posted (edited)

I think I typed this whilst you were posting the last message, Should I do a full copy rather than just the files in the "upgrade" Zip File?

 

See below

 

Thanks

 

 

Tried latest update (HAP+ Web v8.1.1003.0000 Upgrade) and ran move and copy tests. Here are the results. All I did was to copy the files in the Zip and run setup again. Perhaps there's more that I need to do

 

 

 

 

400 An WCF Error has Occured

72ms

jquery....min.js (line 11)

ParamsHeadersPostResponseXMLJSONCookies

 

 

{"Message":"The given key was not present in the dictionary.","Detail":null,"FaultType":"KeyNotFoundException"}

 

 

TypeError: xhr.responseXML.documentElement.children[1] is undefined

[break On This Error]

 

 

...electedItems()[0].Data.Extension != ".doc" && SelectedItems()[0].Data.Extension ...

 

 

 

 

 

 

Thanks

Edited by peterdwyer
Posted

Resolved!

 

Copied entire contents of new ZIP file for HAP+ Web v8.1.1003.0000 to my test server (with the exception of hapconfig.xml), ran setup.aspx and copy/move now working.

 

I suppose that I must have had something else in there that was causing problems. Now all I've got to do is reinstate colour scheme, customised icons and Announcements :-(

 

Thanks for your help Nick.

Posted

There was a problem with it, but I did fix it in 8.1.1003.0000.

 

I think I may need to put a bit more info on my JSON Debug post

 

POST TO https://HAPURL/hap/api/MyFiles/Move[TABLE=class: netInfoPostJSONTable]

[TR=class: netInfoPostJSONTitle]

[TD]

[TABLE="class: netInfoPostJSONTable"]
[TR="class: netInfoPostJSONTitle"]
[TD]JSON
[/TD]
[/TR]
[TR]
[TD="class: netInfoPostJSONBody"][TABLE="class: domTable"]
[TR]
[TD][/TD]
[TD][/TD]
[TD="width: 70%"][/TD]
[/TR]
[TR="class: memberRow userRow"]
[TD="class: memberHeaderCell"][/TD]
[TD="class: memberLabelCell"]NewPath
[/TD]
[TD="class: memberValueCell"]
"N/WPA Files/Test2/asp.net - lesson 1.pdf"[/TD]
[/TR]
[TR="class: memberRow userRow"]
[TD="class: memberHeaderCell"][/TD]
[TD="class: memberLabelCell"]OldPath
[/TD]
[TD="class: memberValueCell"]
"N/WPA Files/asp.net - lesson 1.pdf"[/TD]
[/TR]
[TR="class: memberRow userRow"]
[TD="class: memberHeaderCell"][/TD]
[TD="class: memberLabelCell"]Overwrite

[/TD]
[TD="class: memberValueCell"]
"false"[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[TABLE="class: netInfoPostSourceTable"]
[TR="class: netInfoPostSourceTitle"]
[TD="colspan: 2"]Source

[/TD]
[/TR]
[TR]
[TD="colspan: 2"]{ "OldPath" : "N/WPA Files/asp.net - lesson 1.pdf", "NewPath": "N/WPA Files/Test2/asp.net - lesson 1.pdf", "Overwrite": "false" }[/TD]
[/TR]
[/TABLE]

[/TD]

[/TR]

[TR]

[TD=class: netInfoPostJSONBody][/TD]

[/TR]

[/TABLE]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...