tags:

views:

86

answers:

2

Hi,

I'm looking for a bind/named zone file parser in .NET C#. If there is anything I could import/convert I would be interested too. Unfortunately there's not much, or I'm having troubles finding it.

My goal is to make sure a zone file is syntax-errors-free before I push it to the server.

I'd appreciate any help or hints. Thanks

A: 

Have you tried sending dynamic updates to the bind server? This way you can specify what you want adding in to a zone file and bind handles the correct processing of your request. I have seen a component out there that will allow you to connect to a bind server and send updates to it. I will have a look to see if I can find the control for you.

Update - You can use nsupdate.exe to send a file with the changes that you want to make to the server

There is also a com component that can do this progamatically http://www.noeld.com/programs.asp?cat=dev#DnsLib

Jonathan Stanton
+1  A: 

Absent a recommendation for a C# library (I use C, so don't know of one), you could shell out to the Win32 command line version of named-checkzone which is part of the BIND distribution.

Alternatively, the ldns C library has a zone file reader, if you're able to link in native C code to your C# project.

Alnitak