0

I have a sample code for wopi host and I have installed web app server on my server (192.168.1.103) and a site with name HTTP80 appeared under sites root in IIS manager. I want to know if I have to publish the wopi host into IIS in my server. I have downloaded the wopi host sample code from this site.

How can I use this code to open my doc in a browser?

rocky
  • 7,506
  • 3
  • 33
  • 48

2 Answers2

0

Here's how:

  1. Deploy the WopiHost project to your IIS
  2. Replace App_Data\Discovery.xml with an XML you find at http://192.168.1.103/hosting/discovery (your OWA server)
  3. Adjust appWopiServer in the web.config to match the app you deployed to the IIS
  4. Use LinkController (Controllers\Api\LinkController.cs) or the underlying WopiAppHelper to generate editing links.
  5. Or navigate to the landing page of the WopiHost web app to see an example

Make sure your OWA server can access your WopiHost app.

And if you are interested check out the MVC6 version of the WOPI host here.

rocky
  • 7,506
  • 3
  • 33
  • 48
0

Absolutely, The WOPI application should NOT run from Visual Studio because then it's address would be http://localhost:< portnumber >/ and due to this Office Online Server would not be able to contact it to fetch the document contents and you will see an error message in your document IFrame.

To avoid this you must host the application in IIS and make sure that it is accessible from the Office Online Server.