CSharp Direct Dns Setup
Jump to navigation
Jump to search
WORK IN PROGRESS
Home
OBSOLETE. The reference code is set up using the MSI installer.
The Direct DNS Server uses the Direct Config Service as its record store.
To setup up the Config Store: Smtp Gateway Config Service
Home
OBSOLETE. The reference code is set up using the MSI installer.
Prerequisite
Table of Contents
To setup up the Config Store: Smtp Gateway Config Service
Dns Record Lookup Web Service
The Dns Record Lookup Web Service queries the Direct Config Store Database for Dns information. It exposes a readonly contract invoked by the public facing Direct Dns Server (see below).
Installing Bits
- Open a command prompt
- Do a full build: msbuild build.xml
- You do not need to do a 64 bit build. The Configuration Service uses .NET assemblies compiled for Any CPU.
- cd csharp\dnsresponder.service\install
- copybins.bat
- By default, the binaries needed to run the web service will get placed in C:\inetpub\DirectDnsWebService
- To place binaries elsewhere, type copybins.bat <yourpath>
Customizing Web.config
You must point the Dns Look Up Web Service at the Sql Server containing your Configuration store.
- Open a command prompt
- cd C:\inetpub\DnsService
- notepad web.config
- under connectionStrings, locate the configStore entry
- Edit the connection string. Make sure you supply appropriate Sql login credentials.
Creating the Web Site
The Dns Record Lookup Web Service is a WCF SOAP service with a Basic Http Binding.
- Make sure the service bits are deployed to your target machine (above)
- Launch the IIS Admin UI
- Expand the Sites folder
- Right Click on Default Site, select New Application
- Name the application DnsService
- Set the physical path to C:\inetpub\DnsService (or whatever directly you copied the service code to)
- Make sure you've set the right permissions OR are running the service under an account with adequate privileges
- Inadequate permissions is the most common bootstrap problem
Verifying your installation
- Verify that WCF can run your service:
- Launch your web browser
- [1]
- If you have an already open page, make sure you hit Refresh
- You should see a web service description page
- Verify that your service can connect to the database.
- [2]
- You may see an error like this: System.Data.SqlClient.SqlException: Cannot open database "DirectConfig" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\DefaultAppPool
- If so, you can either:
- Modify your connect string to use a valid Sql Login
- If you use a connect string with Integrated Security, use an App Pool configured to run with a user account that has access to Sql.
Direct Dns Server
The Direct Dns Server runs as Windows Service. It pulls Dns Records from the backend DnsServer Web Service.
Installing Bits
- Open a command prompt
- Do a full build: msbuild build.xml
- You do not need to do a 64 bit build. The Configuration Service uses .NET assemblies compiled for Any CPU.
- cd csharp\windows services\dnsResponder.winsrv
- copybins.bat
- By default, the binaries needed to run the web service will get placed in C:\inetpub\DnsServer
- To place binaries elsewhere, type copybins.bat <yourpath>
- cd C:\inetpub\DnsServer (or your installation directory)
- Type install.bat. This will install the DnsServer as the Windows Service: DirectDnsResponderSvc
Editing Configuration
Point to Record Lookup Service
Starting & Stopping
- Command line:
- net start DirectDnsResponderSvc
- net stop DirectDnsResponderSvc
Managing Dns Records