Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Access folder as a different user

Posted on 2011-02-11
Medium Priority
Last Modified: 2012-05-11

I have the following situation: I have a WPF application written in C#. In the application I need to access a folder on the network. This foder has the appropriate rights only for a special user. How can I, in my application, access files in this folder with the privileges of this special user?

Best regards
Question by:RTSol
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 38

Expert Comment

ID: 34870357
You (an Admin, or the 'owner' of that folder) simply need to right-click on the folder and modify the 'permissions'.

Are you familar with the process?
LVL 38

Expert Comment

ID: 34870369
LVL 12

Accepted Solution

Praveen Kumar earned 2000 total points
ID: 34870573

Author Closing Comment

ID: 34870644
Impersonation was the trick. I searched a bit more and I aslo found this post:

This code worked right out of the box.

Thanks a lot for the trigger

Author Comment

ID: 34870663
PS. younghv - The idea was to not change the permissions so the user can go there outside my app and mess things up.

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is written by John Gates, CISSP. Gates, the SNUG President-Elect, currently holds the position of Manager of Information Systems at Lake Park High School in Roselle, Illinois.
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
Internet Business Fax to Email Made Easy - With  eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question