Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Impersonate vs RunAs user

Reply
Thread Tools

Impersonate vs RunAs user

 
 
Boni
Guest
Posts: n/a
 
      10-08-2009
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.


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      10-13-2009
On Oct 8, 4:27*pm, Boni <(E-Mail Removed)> wrote:
> 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").
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble using "runas" in winxp zxcvbob Computer Support 5 10-28-2006 04:43 PM
runas password Marco Plustin Computer Support 1 09-18-2006 05:34 AM
runas problems www@yy.z Computer Support 2 04-18-2005 04:20 AM
WIN2000:Using runas without password promt Volodymyr Danishevskiy Computer Support 5 01-02-2005 03:26 PM
DirectoryEntry Impersonate or WindowsIdentity Impersonate? Bill Belliveau ASP .Net Security 3 01-31-2004 04:19 AM



Advertisments