add dns record in from c#


How to add record in dns using c#, currently i am trying to use below code, but no luck.

Manage DNS server by C# code

AddARecord("", "", "", ""); is my wan ip.

its throwing below error.

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

please help.

asked on Stack Overflow Sep 21, 2015 by J R B • edited May 23, 2017 by Community

1 Answer


try running your application as administrator if that doesn't work then try disabling your firewall and then run as administrator.

answered on Stack Overflow Sep 21, 2015 by amit dayama

User contributions licensed under CC BY-SA 3.0