CreateProcessAsUser - A required privilege is not held by the client

Hi,

I am working in WinXP 64-bit, Visual Studio 2008 Test Edition.  I have written a unit test in C# for a method written in VB that calls CreateProcessAsUser after impersonating a domain user.

Initially I was working only on my workstation when I was getting the privilege error.  I then granted the domain user the rights to 'Replace a process level token' and 'Adjust memory quotas for a process'.  This fixed the problem but only on my machine.  When the unit test is run on a build server either locally through Visual Studio or during continuous integration builds, it still fails.  I granted the same rights to the domain user on the build server with no success.

I've traced through the code and impersonation is working, with a valid impersonated token being returned.  The domain user has full access to the application and the working directory.  The application is merely a small batch file that will execute through cmd.exe.  

As mentioned, everything works as intended on my workstation so it isn't the unit test.  The error indicates that this domain user is missing something on the build server but I even granted rights it shouldn't have just to see if I could get it to work but no luck.

The build server is running MS WIndows Server 2003 Standard x64 Edition.

Any ideas would be appreciated.
jslmscaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jslmscaAuthor Commented:
The solution:

In order to run the unit test locally through Visual Studio on the build server, the impersonated domain user required elevated rights and be and administrator on the build server.

In order for the continuous integration build to successfully run the unit test, tfsservice required those same elevated rights.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.