Re: Using ImpersonateLoggedOnUser

From: D (anonymous_at_discussions.microsoft.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 08:53:52 -0800

Thanks for the reponse.

I was not able to find the code you are referring to. Do
you have more specific information on how to locate it?

>-----Original Message-----
>It depends on how exactly the print call is being made.
If it invokes
>another process, that process will run under the worker
process account.
>Bruce baker wrote some code to fix this issue in here a
couple weeks ago
>using the .NET API, have a google for it.
>
>--
>Regards
>Alvin Bruney
>[Shameless Author Plug]
>The Microsoft Office Web Components Black Book with .NET
>available at www.lulu.com/owc
>--------------------------------------------------
>
>
>"D" <anonymous@discussions.microsoft.com> wrote in
message
>news:1f0f01c51d23$36a63410$a401280a@phx.gbl...
>> We have a .NET application implemented as a Windows
>> service in order to perform impersonation for the
purposes
>> of gaining access to various resources. We are using
>> ImpersonateLoggedOnUser() instead of the .NET
>> impersonation API.
>>
>> Everything works fine except when we call an external
COM
>> component that is supposed to print a report using its
>> internal API calls. We can access file resources, etc.
>>
>> We perform impersonation to a valid administrator
account,
>> yet the application fails to print (we wrote debugging
>> information to make sure that we are impersonating
>> properly).
>>
>> The problem appears to be that the external process is
>> still using the local SYSTEM account, which by default
>> does not have access to printers (unless the registry is
>> modified - see
http://support.microsoft.com/default.aspx?
>> scid=kb;en-us;184291). If the registry is modified to
>> allow printer access to the SYSTEM account, printing
works
>> fine.
>>
>> We do not want to have to modify the registry to allow
>> access to printers. Any idea why impersonation is
failing
>> here?
>>
>> Thanks in advance.
>
>
>.
>



Relevant Pages

  • Re: system user
    ... > Look for "Client impersonation" in the SDK documentation. ... >>>LOCAL SYSTEM account (though now that I look I don't see anything like ... Then have the LOCAL SYSTEM process ...
    (microsoft.public.development.device.drivers)
  • Re: system user
    ... Look for "Client impersonation" in the SDK documentation. ... LOCAL SYSTEM account (though now that I look I don't see anything like ... Then have the LOCAL SYSTEM process ... I'm guessing that the reasoning for not letting SYSTEM have access to ...
    (microsoft.public.development.device.drivers)
  • Re: system user
    ... Look for "Client impersonation" in the SDK documentation. ... Hence it is usually referred to as the LOCAL SYSTEM account (though now that I look I don't see anything like that in the user namespace... ... Then have the LOCAL SYSTEM process impersonate that user when trying to access the file. ... I'm guessing that the reasoning for not letting SYSTEM have access to ...
    (microsoft.public.development.device.drivers)
  • Re: Forms Authentication and Impersonation
    ... > I am trying to use impersonation for part of my site. ... > download them. ... The anonymous user will not have rights to the ... as long as you don't use the system account and set ...
    (microsoft.public.inetserver.iis.security)
  • Re: CreateProcessAsUser error "the client does not have the required priviledges"
    ... I don't know how to automate the logon and logoff. ... The impersonation ... CreateProcessWithLogonW API. ...
    (microsoft.public.platformsdk.security)