Skip to main content
Windward

RESTful Engine web.config

Overview

This article provides the full contents of the web.config (configuration) file used for deploying the RESTful Engine.

 

web.config Location

The web.config file is usually located in a directory under C:\inetpub\wwwroot\<sitename>. The directory name corresponds to the web application's port and name you provided at install.

 

Always back up your web.config file before modifying the original.
 

 

Sample Contents of the web.config File:  

Below is a sample web.config file with the minimum required configuration for the RESTful Engine. Your license key must be inserted in the below prompted location. Generally (definitely in the case of an ASP.NET application), you will add additional necessary sections to this file depending on your needs.

Sample RESTful Engine web.config file:

 

<?xml version="1.0" encoding="utf-8"?>

<!--

  For more information on how to configure your ASP.NET application, please visit

  http://go.microsoft.com/fwlink/?LinkId=301879

  -->

<configuration>

  <configSections>

    <section name="WindwardReports" type="System.Configuration.NameValueSectionHandler"/>

    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>

  </configSections>

  <WindwardReports>

    <add key="license" value="-->[LICENSE GOES HERE (no spaces)]<--"/>

  </WindwardReports>

  <log4net>

    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">

      <!-- This is where your log is saved; choose a location with appropriate permissions -->

      <param name="File" value="C:\inetpub\wwwroot\logs\RESTfulEngine.log"/>

      <appendToFile value="true"/>

      <rollingStyle value="Date"/>

      <datePattern value=".yyyy-MM-dd"/>

      <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>

      <layout type="log4net.Layout.PatternLayout">

        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/>

      </layout>

    </appender>

    <root>

      <level value="DEBUG"/>

      <appender-ref ref="RollingFileAppender"/>

    </root>

  </log4net>

  <appSettings></appSettings>

  <system.web>

    <compilation targetFramework="4.5.1" />

    <httpRuntime targetFramework="4.5.1" />

  </system.web>

 

  <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />

        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-5.2.2.0" newVersion="5.2.2.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="1.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />

        <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />

        <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />

      </dependentAssembly>

    </assemblyBinding>

  </runtime>

<system.webServer>

    <handlers>

      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

      <remove name="OPTIONSVerbHandler" />

      <remove name="TRACEVerbHandler" />

      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

    </handlers>

  </system.webServer></configuration>

 

Note: If logging is slowing you down, please see the article from Apache to remove or disable https://logging.apache.org/log4net/r...roduction.html

Download Sample web.config:  

You can also download this sample web.config file.

  • Was this article helpful?