MindTouch Dream contains a System.Web.HttpHandler class to process requests and send them into the Dream environment without the need for running an external executable such as mindtouch.host.exe. Below are the steps for configuring Dream for IIS7.
web.config file into the dream folderdream.startup.xml into the dream folderdream/bin folderdream/bin folderdream/bin/servicesIIS_IUSRS account read-write access to the dream/data treedream folderhttp://localhost/host/version to verify that Dream works--- dream
|
|-- bin
| |
| \-- services
|
\-- data
|
|-- logs
|
\-- servicestate
Configure the Dream Settings section for your application.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- NOTE: this element must be first -->
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<!-- add 'bin/services' folder to assembly search path -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\services"/>
</assemblyBinding>
</runtime>
<!-- Dream Settings -->
<appSettings>
<add key="Lucene.Net.lockDir" value=""/>
<!-- Folder where service state is stored -->
<add key="storage-dir" value="..\data\servicestate" />
<!-- TODO: set the Dream host service API key -->
<add key="apikey" value="123" />
<!-- Script(s) to run when Dream server starts up -->
<add key="script" value="dream.startup.xml" />
</appSettings>
<!-- IIS connection settings -->
<system.net>
<connectionManagement>
<clear />
<add address="*" maxconnection="16" />
</connectionManagement>
</system.net>
<!-- IIS 7 handler settings -->
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
<handlers>
<clear />
<add name="Dream" path="*" verb="*" type="MindTouch.Dream.Http.HttpHandler, mindtouch.core" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
<!-- Log4Net settings -->
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender, log4net">
<file value="..\data\logs\dream.log" />
<appendToFile value="true" />
<maximumFileSize value="100KB" />
<maxSizeRollBackups value="4" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="OutputDebugStringAppender" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<root>
<!-- Set logging level to ALL, FATAL, ERROR, WARN, INFO, or DEBUG -->
<level value="DEBUG" />
<appender-ref ref="RollingFileAppender" />
<appender-ref ref="OutputDebugStringAppender" />
</root>
</log4net>
</configuration>
<script>
<!-- TODO: repeat the following line for each assembly that needs to be explicitly loaded -->
<action verb="POST" path="/host/load?name=service-assembly" />
<!-- TODO: repeat for each service that needs to be started -->
<action verb="POST" path="/host/services">
<config>
<path>service-path</path>
<sid>sid://example.com/service-name</sid>
<!-- TODO: add custom <config> elements -->
</config>
</action>
</script>