Tom Sage
asked on
Problem with Impersonate on a web service
I have a working web service. When data is received I would like to run an external program against this data. I have setup impersonation to use a known-working username and password, but the program does not run.
Thanks for any ideas.
Thanks for any ideas.
If impersonateValidUser("myuser", "WEST", "mypassword") Then
'
Dim proc As New Process
proc.StartInfo.Password = New System.Security.SecureString()
For Each c As Char In "mypassword"
proc.StartInfo.Password.AppendChar(c)
Next
proc.StartInfo.UseShellExecute = False
proc.StartInfo.Arguments = arg1 & " " & arg2
proc.StartInfo.FileName = "C:\Program Files\DoMerge\DoMerge.exe"
proc.Start()
undoImpersonation()
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also try without giving password, username and domain if your imperosnate user has rights to create process.
ASKER
Hi jinal,
Yes, I put a call to an email program in the IF statement, so I know I am using valid credentials.
Thanks
Yes, I put a call to an email program in the IF statement, so I know I am using valid credentials.
Thanks
ASKER
jinal,
I ran the process explorer program, and I can see that the program did start, but it did not run to completion. It seems hung for some reason.
Thanks
I ran the process explorer program, and I can see that the program did start, but it did not run to completion. It seems hung for some reason.
Thanks
is it required any input for process?
ASKER
Thank you for the help.