DnsWeb Service Settings

From Direct Project
Jump to: navigation, search
Back: CSharp Reference Implementation

The Dns Record Retrieval Service is a WCF middle tier service. The Direct Dns Server calls it to retrieve Dns records.


Config File

All configuration is stored in Web.config. 
  • The web.config checked into the source tree (csharp\dnsresponder.service\web.config) contains sample configuration.
  • When you deploy, you should replace this web.config with one of your own.
  • Because the Dns Web Service runs as a WCF service hosted in IIS, The configuration file must be named Web.config


Standard Config Sections

Make sure your config file contains the Standard Direct Config Sections
<configuration> <configSections> <section name="logging" type="Health.Direct.Common.Diagnostics.LogFileSection, Health.Direct.Common" /> <section name="ioc" type="Health.Direct.Common.Container.IocContainerSection, Health.Direct.Common" /> <section name="container" type="Health.Direct.Common.Container.SimpleContainerSection, Health.Direct.Common" /> .... </configSections> ... <configuration>


Connect String

/configuration/connectionStrings (Required)

<configuration>
...
    <connectionStrings>
        <add name="configStore" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DirectConfig;Integrated Security=SSPI;"/>


AppSettings

/configuration/appSettings

<configuration>
...
    <appSettings>
       <add key="queryTimeout" value="00:00:10" />
     </appSettings>
...


key
Required
Type
Default
Description
queryTimeout
No
Timespan
00:00:05
5 seconds


Logging

/logging (Required)
You customized logging using the logging section.

<configuration>
...
   <logging>...


WCF


  • Hosted in IIS (Http Activation)
  • Tested with basicHttpBinding.
  • The behavior with other bindings is not known - currently there are no plans to try them.


The Dns Record Retrieval service implements a single endpoint: Records.

Bindings

Make sure your configuration contains the config xml below:

<configuration> .... <system.serviceModel> <services> <service behaviorConfiguration="Health.Direct.DnsResponder.Service.RecordRetrievalService" name="Health.Direct.DnsResponder.Service.RecordRetrievalService"> <endpoint address="Records" binding="basicHttpBinding" contract="Health.Direct.DnsResponder.Service.IRecordRetrievalService"/> </service> </services> <behaviors> <serviceBehaviors> <behavior name="Health.Direct.DnsResponder.Service.RecordRetrievalService"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> ...