By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Impersonation problem

P: 70
Hi All,

I have created a User 'TestUser' and allow them to read/write permission on a file system in a machine. Whenever I logged in with the credential with TestUser then I can create/delete/access that file system. I have another machine where I have hosted a web service and used .net impersonation and passed the credential of TestUser to that web service. When I tried to create a file on that machine then it shows the error Access Denied. And If I used Administrator credential or another user's credential to create the file then it does not show any error and creates the files successfully. I do not understand what is the problem. Would you please let me know the solution?
Mar 9 '09 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 750
PRR
@pankajprakash
As far as i can see, the "TestUser" does not have rights on your webservice machine...use an account the has access rights .. and make sure you use impersonation....
Mar 10 '09 #2

P: 70
Thanks for your replay. I have created an independent user account TestUser and allow him to loggin to that another machine (suppose MachineA). He can create/delete/access that particular file/folder on that machine. Now I had a web service on another machine (suppose MachineB). I had used impersonation with that TestUser credential. When I go to the impersonation function it return true, however when that web service create a file on MachineA it occours the error Access denied. I am still not able to understand the problem.
Mar 10 '09 #3

Expert 100+
P: 750
PRR
Thats due to worker threads in asp.net and web service... check this...for more info...
Or you could do this
Expand|Select|Wrap|Line Numbers
  1. <authentication mode="Windows" />
  2. <identity impersonate="true" />
  3.  
Turn off anonymous access in iis for this to work...
Mar 11 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.