Impersonate vs RunAs user


B

Boni

I have to send some epl's commands to a shared printer. I would an asp.net
service doing this from my web server to a pc client wich has the shared
printer plugged.

If I exec my application like a console application it works, so like
running the service inside a cassini web server. Using IIS it doesn't work.
Off course in the first two cases the applications running with
administator's privileges so I tried to using the "Impersonate" script in
order to exec the commands with more higher privileges .
Despite this using the server's administrator account under IIS the service
doesn't work but if I use a domain's user account it works. ( the server is
outside the domain ).

I don't understand the difference executing code between using the
Impersonate or as a normal program.

Thnak's for your help.
 
Ad

Advertisements

G

Guest

I have to send some epl's commands to a shared printer. I would an asp.net
service doing this from my web server to a pc client wich has the shared
printer plugged.

If I exec my application like a console application it works, so like
running the service inside a cassini web server. Using IIS it doesn't work.
Off course in the first two cases the applications running with
administator's privileges so I tried to using the "Impersonate" script in
order to exec the commands with more higher privileges .
Despite this using the server's administrator account under IIS the service
doesn't work but if I use a domain's user account it works. ( the server is
outside the domain ).

I don't understand the difference executing code between using the
Impersonate or as a normal program.

Thnak's for your help.

When you run a console application, it would work because it used your
domain user account. When you run it under local admin account on the
server, it doesn't work because that account has no access to the
printer. You should get the same result when you run your console
application as local administrator ("run as").
 

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