Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on a service that does an enumeratefiles from a directory. I have it working locally however I need it to be able to get the files from a mapped drive on an iSeries mainframe. The mainframe is not on the domain so it has a seperate user. I can map a drive to the mainframe from the server and browse. However if I try to access the share via service, I get a message that the directory is not available.

Is there security I can set for the service to access the directory via the mapped drive with LocalSystem, LocalService or Network user?

Is there a way to impersonate the user that I map the drive with and use the UNC Path?

Thanks in advance for any advice
Posted
Comments
ledtech3 8-Aug-13 21:28pm    
The error sounds more like a path problem than a security problem.
But It may be an acced denied but returning the not available.
Impersonate: Just a couple of the links found
http://msdn.microsoft.com/en-us/library/w070t6ka.aspx
http://www.codeproject.com/Articles/14358/User-Impersonation-in-NET

1 solution

Thanks for the response. I tried implementing the codeproject impersonation listd in your answer but didn't work. I ended up creating a user on the iseries that emulated the username/password of the AD account. It works now. The two accounts just have to be synced on passwords going forward.
 
Share this answer
 
Comments
ledtech3 9-Aug-13 19:55pm    
Glad you solved your problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900