Skip to content

Deploying Documentation on IIS

Marin Bratanov edited this page Apr 19, 2017 · 7 revisions

If you do not want to deal with Jekyll configurations and mess up the _plugins/slug.rb file you can deploy the built site under IIS.

To achieve that you can follow these steps:

  1. Make sure you have an URL Rewrite Module installed;

    To install it, just download the installation—http://www.iis.net/downloads/microsoft/url-rewrite—from Microsoft and follow the installation steps.

    If you are not sure if the module is installed, check if there is such an option in any of the already deployed sites:

  2. Build the Jekyll site, without modifying the Jekyll configuration (_config.yml) or any of the plugins (_plugins\slug.rb):

     jekyll build
    

    If you need to run the build with a watch, use this command:

     jekyll build --watch
    

    This will lead you to a generated site in the _site folder, located in the root.

  3. Add the Jekyll site to IIS:

    1. Note down the base url configured in Jekyll. By default, it is set to /devtools/aspnet-ajax;

    2. Add a Virtual Directory named devtools, and configure its Physical path to navigate to the parent folder of the repository;

      Important: If the name of the application is different, the requests to the CSS and JavaScript files will fail.

      web application

    3. When created, IIS should automatically find the web application named aspnet-ajax.

      If, however, the aspnet-ajax web application does not appear, just add it manually:

      1. Right click -> Add Application;
      2. Name: aspnet-ajax;
      3. Physical path: [path-to-ajax-docs]/_site.

      web application

    4. Browse the aspnet-ajax application in the browser.

      in browser

      If you get an error that sections from the web.config cannot be defined, enable the Feature Delegation in your IIS: http://stackoverflow.com/questions/9794985/iis-this-configuration-section-cannot-be-used-at-this-path-configuration-lock

Clone this wiki locally