title: Create domain in windows Dns using C #
body: <p>Good morning, I need to create a little program in webforms (C #) to facilitate the creation of DNS zones under Windows server 2008.</p>
  
  <p>I found this class created by ademar: <a href="http://ademar.name/blog/2005/07/a-simple-net-interface-to-dnsc.html" rel="nofollow">http://ademar.name/blog/2005/07/a-simple-net-interface-to-dnsc.html</a></p>
  
  <p>Aparententemente should work perfectly. But during testing does not work.</p>
  
  <p>On line: Execute ("/ ZoneAdd" + zone + "/ Primary / file" + zone + ".dns"); when trying to run generates a file not found error because the command / file trying to find arquivo.dns in the c:\windows\system32\dns, and the file does not exist.</p>
  
  <p>I tried to create the file using C #, there can not because it generates other written permission error in this folder, even tried to add permission for my admin user and yet the permission error:</p>
  
  <p>Could not find a part of the path 'c:\windows\system32\dns\meusite.com.br.dns'.</p>
  
  <p>Can anyone give me a help?</p>