Identity crisis

G

Guest

I need to change dynamically some DNS registers of our domain.
I figured that a WS would do the job so I developed a WS that has only one web method that receives an ID and an IP address from it clients. It verifies the ID and then proceeds to change the DNS pointer with the “dnscmd.exe†utility on a Win2000 server.

<WebMethod()> Public Function Nueva(ByVal quienSoy As String, ByVal miIP As String) As String
Dim miPInfo As ProcessStartInfo
Dim miProc As Process
Dim regreso As String

miPInfo = New ProcessStartInfo
With miPInfo
.FileName = "C:\WinNT\System32\dnscmd.exe"
.Arguments = ". /RecordDelete diato.com.mx " & quienSoy & " A /f"
.RedirectStandardOutput = True
.UseShellExecute = False
End With

miProc = Process.Start(miPInfo)
miProc.WaitForExit()
regreso = miProc.StandardOutput.ReadToEnd
Return regreso
End Function


When I run these method I get a “Command failed: ERROR_ACCESS_DENIED 5 (00000005)†as the return string (StandardOut of the process)

I went a added a user in this machine and made it a member of the “administrators†group.
I used the ASPNET_Setreg utility to encrypt the user name and password in the registry.

I added these lines in the Web.Confg file :

<identity impersonate="true"
userName="registry:HKLM\SOFTWARE\MyApp\MyId\ASPNET_SETREG,userName"
password="registry:HKLM\SOFTWARE\ MyApp\MyId\ASPNET_SETREG,password" />

I restarted the system and I get the same error message.

What am I doing wrong?
What else do I need to do?
Is there a smarter way to change DNS registers?

(Of course, if I run the dnscmd utility from the CMD box it runs ok)

Thanks,

Luis
 
E

Enkidu

I need to change dynamically some DNS registers of our domain.
Hi Luis, do you mean that you want to change them, say every hour? Or
do you want to change them one time and one time only? If it is the
second case, why not use DHCP?

I'm trying to think why you would need to change the DNS address say
every hour. Can you share this with us?

Cheers,

Cliff

{MVP Directory Services}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top