• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Writing to a Network Share that Requires User Authentication

Does anyone know how to write a file to a network share (\\somePC\dir1\dir\) if write access requires logging in as a different user?

Thanks!
0
mskibbz
Asked:
mskibbz
  • 2
  • 2
1 Solution
 
mskibbzAuthor Commented:
The application will run on a Windows 2000 Server machine and will be attempting to write to a network share on a Windows 2003 machine (Dell PowerVault)...

Thanks!
0
 
gregoryyoungCommented:
yeah ... use the logonuser api and impersonate the different user in code.
http://www.codeproject.com/useritems/ZetaImpersonator.asp contains details.

Greg
0
 
mskibbzAuthor Commented:
Are you sure that will work with the Windows 2000 security defaults?

Thanks
0
 
gregoryyoungCommented:
if it doesn't there is always the option of mapping the other machine as a drive ... which will work :)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now