Question

this seems like a really simple task or so i thought it would be but i still cant get this to work.

I have a stored procedure that creates a text file on the sql server. once the file is created it passes the file name to the assembly which copies the file across to multiple servers which are on different domains.

its works with machines that are in the same domain as the sql server

i have a problem when copying the files across domains i keep getting the following error

System.UnauthorizedAccessException: Access to the path '\***' is denied.

i have tried impersonating a windows user which also didn't work

thanks in advance

Was it helpful?

Solution

The account that the "assembly" is running under must have permissions to do what your asking it to do.

Either that or you must have a portion of the code in your assembly begin running under the context of a user that does have these permissions to do the copy.

This really has nothing to do with SQL server. Its simply does the account executing the code have the permission to do what your telling it to do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top