How to integrate online editors into your own web site on .Net (C#)


To integrate ONLYOFFICE online editors into your own website on .Net (C#) you need to download and install ONLYOFFICE editors on your local server and use the .Net (C#) example for their integration.

The integration examples are used to demonstrate document editors functions and the ways to connect Document Server to your own application. DO NOT USE these examples on your own server without PROPER CODE MODIFICATIONS!

This guide will show you the sequence of actions to integrate the editors successfully.

First, download the ONLYOFFICE Editors (the ONLYOFFICE Document Server).

See the detailed guide to learn how to install Document Server for Windows, for Linux, or for Docker.

Download the .Net (C#) example from our site.

You need to connect the editors to your web site. For that specify the path to the editors installation in the settings.config file:

<add key="" value="https://documentserver/" />

where the documentserver is the name of the server with the ONLYOFFICE Document Server installed.

If you want to experiment with the editor configuration, modify the parameters it the DocEditor.aspx file.

To run your website with the editors successfully, check if your system meets the necessary system requirements:

  • Microsoft .NET Framework: version 4.5 (download it from the official Microsoft website);
  • Internet Information Services: version 7 or later.
  1. Run the Internet Information Service (IIS) manager

    Start -> ControlPanel -> System and Security -> Administrative Tools -> Internet Information Services (IIS) Manager

  2. Add your web site in the IIS Manager

    On the Connections panel right-click the Sites node in the tree, then click Add Website.

  3. In the Add Website dialog box specify the name of the folder with the .Net (C#) project in the Site name box.

    Specify the path to the folder with your project in the Physical Path box.

    Specify the unique value used only for this website in the Port box.

  4. Check for the .NET platform version specified in IIS manager for you web site. Choose v4.0. version.

    Click the Application Pool -> right-click the platform name -> Set application Pool defaults -> .NET CLR version

  5. Browse your web site with the IIS manager:

    Right-click the site -> Manage Website -> Browse

In case the example and Document Server are installed on different computers, make sure that your server with the example installed has access to the Document Server with the address which you specify instead of documentserver in the configuration files. And you must also make sure that the Document Server in its turn has access to the server with the example installed with the address which you specify instead of in the configuration files.

If you integrated the editors successfully the result should look like the demo preview on our site.