Nant Build, Impersoante a user?
-
Hi all, Wasn't sure were to post this so if its in the wrong place then oops!! I'm using nant to automate my release process, its been working fine on all the other repositories but now I'm trying to deploy to two locations. One of which is on a remote machine. Every time that I try to run the script I get an UnauthorisedAccessException (shown below). I think the problem is that nant is running under the system user, which probably doesn't have permission to access a remote machine. So i've tried 3 ways to get around this 1) Map the network drive, doing this I can specify the credentials for a user which should have privileges on the remote server. Then as long as I specify the drive letter in the build script it should work. Unfortunately I'm accessing the box that is running the nant scripts through RDC so any share that i create only exists in my session and not under the system account! 2) Use an impersonate function in Nant. I've looked through the docs but can't see such a function anywhere. Is there? 3) Ask the people on the code project. So i'm on option 3 at the moment, any ideas? Thanks Phil deploy-library: [copy] Copying 8 files to '\\server\dev_published_dlls\devlib'. [copy] Copying 'D:\dev_auto_copies\dev_libs\DevLibTests\bin\Debug\DevLibTests.dll' to '\\server\dev_published_dlls\devlib\DevLibTests.dll'. BUILD FAILED D:\dev_auto_copies\dev_libs\Common.build(71,8): Cannot copy 'D:\dev_auto_copies\dev_libs\DevLibTests\bin\Debug\DevLibTests.dll' to '\\server\dev_published_dlls\devlib\DevLibTests.dll'.: NAnt.Core.BuildException: D:\dev_auto_copies\dev_libs\Common.build(71,8): Cannot copy 'D:\dev_auto_copies\dev_libs\DevLibTests\bin\Debug\DevLibTests.dll' to '\\server\dev_published_dlls\devlib\DevLibTests.dll'. ---> System.UnauthorizedAccessException: Access to the path '\\server\dev_published_dlls\devlib' is denied.