I need to write a file to a windows share on a computer not part of a domain from ASP.net.
I’ve tried implementing impersonation like : http://support.microsoft.com/?id=306158 which wraps the LogonUserA api call. Something isn’t working though, and I don’t know why. (It doesn’t seem to give any error code or reason message…)
I think it’s because the remote computer is NOT on a domain. ? I don’t know.
I can’t use the “matching local user/pass on both machines” trick, can someone help?
From my answer on this question, give this a try:
I liked Mark Brackett‘s answer so much that I did my own quick implementation. Here it is if anyone else needs it in a hurry: