Impersonation

G

Guest

Hi,
I have 2 computers (hostname1, hostname2 for which I have the administrator login)
I have a test.bat file which contains the command:
netsvc Browser \\hostname2 /query.
This test.bat file works fine when I run it manually by double-clicking it from my computer(hostname1).
But when I run this command from my ASP .NET application, I get an error: could not open service manager
So I used Impersonation in my web.config file to impersonate the user.
<identity impersonate="true" userName="hostname2\user" password="password" />
But then neither I get the error nor anything happens.
Why is this happening..?
What should I be doing to make this command work from my computer to the other computer?
Thanks,
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top