Open stormbinary opened 2 years ago
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
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
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?
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" } } }
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.
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
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
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.
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.
using the UNC for a file, leads to this
oos must ping/echo wopihost (localhost)
I also like this,
have you solved? @stormbinary
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.