Giter Site home page Giter Site logo

petrsvihlik / wopihost Goto Github PK

View Code? Open in Web Editor NEW
190.0 21.0 73.0 4.9 MB

ASP.NET Core MVC implementation of the WOPI protocol. Enables integration with WOPI clients such as Office Online Server.

License: Other

C# 97.74% CSS 0.26% HTML 2.00%
office owa wopi ms-wopi ms-fsshttp oos wopi-host net-core aspnet-core office-online

wopihost's Introduction

wopihost's People

Contributors

demigodplayz avatar dependabot[bot] avatar dvojitywendy avatar fossabot avatar fredikats avatar jj-connect avatar petrsvihlik avatar whocarrot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wopihost's Issues

Implement Folders & Containers endpoints

Implement Authorization properly

.net core bug - system.net.http

waiting for this to be resolved:
https://github.com/dotnet/corefx/issues/11100

workaround:

ο»Ώ<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="4.1.1.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
</assemblyBinding>
  </runtime>
</configuration>

Will this project run on linux/.Net Core

Hello,

Thanks for the great sample. WIll this run on Linux and .Net Core? If yes which version of .Net Core would you suggest I try to play around?

Thanks,
G

hi @petrsvihlik

I'm run your project in my PC very well, but WopiHost show message like this:
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[0]
An unhandled exception has occurred while executing the request
System.FormatException: The input is not a valid Base-64 string as it contains a
non-base 64 character, more than two padding characters, or an illegal characte
r among the padding characters.
at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, B
yte* startDestPtr, Int32 destLength)
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at WopiHost.FileSystemProvider.WopiFileSystemProvider.DecodeIdentifier(String
identifier) in D:\WopiHost-master(4)\WopiHost-master\WopiHost.FileSystemProvide
r\WopiFileSystemProvider.cs:line 97
at WopiHost.FileSystemProvider.WopiFileSystemProvider.GetWopiFile(String iden
tifier) in D:\WopiHost-master(4)\WopiHost-master\WopiHost.FileSystemProvider\Wop
iFileSystemProvider.cs:line 47
at WopiHost.Core.Controllers.FilesController.d__11.MoveNext
() in D:\WopiHost-master(4)\WopiHost-master\WopiHost.Core\Controllers\FilesContr
oller.cs:line 64
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionEx
ecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next
, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__
20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.<Invoke>d__ 18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware1.d__
18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
ification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.
d__7.MoveNext()
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 1040.8624ms 500 text/html; charset=utf-8

It may possibly cannot support file with chinese character filename ???
i have file named chinese character filename in wopi-docs.

How to support chinese character filename ?

can't view word but can edit

Have you ever met this issue?
Excel can be viewed and edited. Word can't (not all files, some can be viewed ), all of them are editable though.I'm wondering if this bug was caused by oos server?

Set up code coverage on comit

Set up on of the following:

  1. Download OpenCover
  2. Run OpenCover
  3. Upload OpenCover's results

running opencover with .net core:

example of opencover with dotnet cli:
http://stackoverflow.com/questions/36460254/vs2015-code-coverage-not-working-with-tests-in-asp-net-core-1-0-formerly-known

working code:
OpenCover.Console.exe -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:" test ""C:\Users\petrs\Documents\GitHub\WopiHost\WopiHost.FileSystemProvider.Tests\project.json"" -f netcoreapp1.0 -xml ""C:\Users\petrs\Documents\GitHub\WopiHost\WopiHost.FileSystemProvider.Tests\xunit-results.xml"" -nologo -parallel none" -output:"C:\Users\petrs\Documents\GitHub\WopiHost\coverage.xml" -register:user -filter:"+[*]* -[xunit*]* -[*]*Migrations.*" -returntargetcode -oldstyle

-oldstyle argument required until OpenCover/opencover#595 gets implemented

another example that should work:
c:\Users\tmds\AppData\Local\Apps\OpenCover\OpenCover.Console.exe "-target:C:\Program Files\dotnet\dotnet.exe" -targetargs:test -register:user -filter:"+[*]* -[xunit*]*" -output:coverage.xml -oldStyle

opencover+appveyor example:
https://github.com/jwaliszko/ExpressiveAnnotations

other resources:
https://github.com/OpenCover/opencover/wiki/DNX-Support
http://blog.stephencleary.com/2015/03/continuous-integration-code-coverage-open-source-net-coreclr-projects.html
http://dotnetthoughts.net/measuring-code-coverage-of-aspnet-core-applications-using-opencover/
http://help.appveyor.com/discussions/problems/4394-problem-with-args-to-xunit-in-powershell
OpenCover/opencover#327

Full YMLs:

Split FilesController.PerformAction method to many per X-WOPI-Override header value

Fix RC2 breaking changes

Create sample integrating with office online

Where to download the client discovery XML from for Office Online WOPI Client?

First of all, very nice. Thank you so much. Your project is very helpful for me.

I see that you have the client discovery XML for Office Online inside your discovery tests and you're probably using your FileSystemDiscoveryProvider (or some such) to load the downloaded file.

But if I need to use your HttpDiscoveryProvider to get the XML from the Web, at what URL may I find the client discovery XML file for Office Online?

You may answer the question here or on StackOverflow or both.

My question is: https://stackoverflow.com/questions/45429487/from-where-may-i-get-the-wopi-client-discovery-xml-for-the-wopi-client-office-on

Permalink: https://stackoverflow.com/q/45429487/303685

Once more, thanks for such a wonderful effort.

Error during Opening the url of edit document

I am getting this error when I was trying to open the edit url
by the next url

http://owas.cmsad.local/we/wordeditorframe.aspx?WOPISrc=http%3a%2f%2fowas.cmsad.local%2fhosting%2fdocs%2ftest.docx&access_token=IXuJCdjmmhc%3dHfPAmKzzT%2bs7zJpT4czLS4SVv1kBeGsIpbtJxaq%2f6mQ%3d&ui=zh-CN

Exception WAC Server FrontEnd unhandled exception [0] Microsoft.Office.Web.Common.EnvironmentAdapters.FileUnknownException: required URL paramters are not present at Microsoft.Office.Web.Apps.Common.WopiDocument.CreateFromQuerySignature(String querySignature) at Microsoft.Office.Web.Apps.Environment.WacServer.WSMainStorage.GetBaseDocumentFromContext(HttpContext context, String rawHostDocumentId) at Microsoft.Office.Web.Host.WacServer.WebOneNote.WoncaFrame.OnPreRender(EventArgs e) at Microsoft.Office.Web.Host.WacServer.WebOneNote.WordEditorFrame.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) StackTrace: at uls.native.dll: (sig=2... 6b5565bf-0574-4f6e-8c6c-f9d0c1549913

Fix rc1 breaking changes

aspnet/Announcements#77 βœ…
aspnet/Announcements#80 βœ…
aspnet/Announcements#91 βœ…
aspnet/Announcements#93 βœ…
aspnet/Announcements#97 βœ…
aspnet/Announcements#98 βœ…
aspnet/Announcements#104 βœ…
aspnet/Announcements#113 βœ…
aspnet/Announcements#116 (aspnet/Announcements#64 (comment)) βœ…

appveyor
A single continuous-integration/appveyor GitHub commit status was replaces with two separate statuses: continuous-integration/appveyor/branch and continuous-integration/appveyor/pr for regular "push" and PR builds respectively.
If you have protected GitHub branches checking AppVeyor status please update them now to use new continuous-integration/appveyor/pr status.

Incorporate .NET Core 1.1/2.0/3.0 Changes

Update documentation on hosting + support all possible hosting options

How and where can I get the WOPI Client (Office web app server) error logs

Hi petrsvihlik, my issue is rather related to a general problem then to your source code, I am sorry if you didn't like me raising this question as an issue. I found you most active on WOPI platform.

I have implemented the WOPI Host and client on Windows Server 2012 RC, I can access the discovery url but when I am trying to open a office file on the browser, the file is not getting load.

I can see the logs of WOPI Host but how can I see the WOPI Client error logs ? when I further investigated I found in the IIS Administrator tools under event viewer there are lots of error logs related to Office Web Apps Server and all are showing "Reported Status :Machine Health is UnHealthy".

Please let me know if you have any idea on this issue.

Add xunit runner to appveyor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.