A
Andy Klare
I am looking for a way to copy a file from a local drive on the server to a
network share but I need to authenticate as a user that has access to the
network share. How can I tie a different set of credentials to the
File.Move()? I can add an Impersonate tag with domain,Username, and
Password to the web.config to get the code to work on my machine as myself
but I think I will have problems when I deploy to a server that does not
have my account as an administrator on it. I would like to simply build a
NetworkCredential object and tie it to the File.Move() call but that does
not appear to be an option.
Does anyone have a example of this? It seems like a fairly simple task but
I am not finding much.
Any ideas would be most appriciated.
Thanks,
Andy
network share but I need to authenticate as a user that has access to the
network share. How can I tie a different set of credentials to the
File.Move()? I can add an Impersonate tag with domain,Username, and
Password to the web.config to get the code to work on my machine as myself
but I think I will have problems when I deploy to a server that does not
have my account as an administrator on it. I would like to simply build a
NetworkCredential object and tie it to the File.Move() call but that does
not appear to be an option.
Does anyone have a example of this? It seems like a fairly simple task but
I am not finding much.
Any ideas would be most appriciated.
Thanks,
Andy