Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't find the file you wanted #141

Open
stormbinary opened this issue Mar 14, 2022 · 10 comments
Open

couldn't find the file you wanted #141

stormbinary opened this issue Mar 14, 2022 · 10 comments
Labels

Comments

@stormbinary
Copy link

oos_01

Hi,
Downloaded v2.0 release (https://github.com/petrsvihlik/WopiHost/releases/tag/2.0.0).
Set the wopihost to the port that I have available on my pc.
Set ClientUrl to the Office Online Server 2016 address I had configured.
Obviously can not find the Excel file .
I would be grateful for any hint.
Thanks.

@petrsvihlik
Copy link
Owner

Can you debug the app? Specifically, try putting a breakpoint into the checkfileinfo and getfile methods and see if they're hit and what they return.
Also, you can check detailed error messages by looking into the windows event viewer. Follow the steps here: https://stackoverflow.com/a/62384305/1332034

@stormbinary
Copy link
Author

stormbinary commented Mar 15, 2022

I was very grateful for responding to my note.
a) the four files in the WopiHost\wwwroot\wopi-docs were listed in the browser, otherwise couldn't have selected the test.xlsx.
b) when getting the WopiHost.Web -> HomeController -> Index
oos_02

I am getting a dot before the file name as you see. Is this the problem?

c) on my online server, there are some errors mostly of this type:

AgentManagerWatchdog reported status AgentManagerWatchdog in category '...'. Reported status: Machine health is Unhealthly.
..
WordViewerAppManagerWatchdog has NOT reported recently. ...

d) site https://wopi.readthedocs.io no longer exists and therefore the validator app is 404. Any other sites for docs?

@stormbinary
Copy link
Author

WopiHost appsetting
{
"Wopi": {
"UseCobalt": false,
"StorageProviderAssemblyName": "WopiHost.FileSystemProvider",
"StorageProviderOptions": {
"RootPath": ".\wwwroot\wopi-docs"
}
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

WopiHost.Web settings
{
"Wopi": {
"StorageProviderOptions": {
"RootPath": "..\WopiHost\wwwroot\wopi-docs"
},
"HostUrl": "http://wopihost:12000",
"ClientUrl": "http://oos"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

@stormbinary
Copy link
Author

GetCheckFileInfo and GetFile are functions inside FilesController which are not hit.
Furthermore, WopiHost complains "Unable to connect to web server 'IIS Express'", despite the fact that there is port 12000 up on local IIS Express.

@stormbinary
Copy link
Author

stormbinary commented Mar 15, 2022

a) I set my online setup to Set-OfficeWebAppsFarm -OpenFromURLEnabled
b) ran http://..../op/generate.aspx#
c) got the page "Provide a link that opens Word, Excel, or PowerPoint files in a web browser"
d) provided this link https://filesamples.com/samples/document/docx/sample3.docx to open
e) after while trying comeback with "An error occurred We're sorry, but for some reason we can't open this for you."

I would appreciate any help. Thank you

@stormbinary
Copy link
Author

I have found out that test file in the "%systemdrive%\Program Files\Microsoft Office Web Apps\OpenFromUrlWeb" get downloaded rather than viewed. Also left message at the stack exchange https://stackoverflow.com/questions/71515873/office-file-is-downloaded-rather-than-viewed

@petrsvihlik
Copy link
Owner

petrsvihlik commented Mar 18, 2022

I am getting a dot before the file name as you see. Is this the problem?

That shouldn't be a problem. It seems that the FileInfo is loaded correctly. Dots and double dots are fine, they're just relative pointers.

GetCheckFileInfo and GetFile are functions inside FilesController which are not hit.
Then try to find out if the app gets hit at all. Try putting a breakpoint in the AccessTokenHandler.HandleAuthenticateAsync.

Furthermore, WopiHost complains "Unable to connect to web server 'IIS Express'", despite the fact that there is port 12000 up on local IIS Express.

I run the app using Kestrel. I haven't tried IIS Express for a while. Can't help with that.

http://..../op/generate.aspx#

It needs to be a UNC location (starting with \\)

Also left a message at the stack exchange https://stackoverflow.com/questions/71515873/office-file-is-downloaded-rather-than-viewed

Good that you submitted it there. I will try to find some time to reply on StackOverflow.

@stormbinary
Copy link
Author

using the UNC for a file, leads to this
image

@pccai
Copy link

pccai commented Oct 28, 2022

oos must ping/echo wopihost (localhost)

@dausdauy
Copy link

dausdauy commented Nov 29, 2022

image

I also like this,

have you solved? @stormbinary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants