Last post Oct 06, 2016 06:40 AM by Cathy Zou
Oct 05, 2016 06:22 PM|ray247|LINK
We have an ASP.NET application running on Server A which is on its own domain, in the web.config we are impersonating a user. Now this application needs to access a folder on Server B which is on a different domain, and Server B declines the access due to
lack of privilege.
So we manually tried from cmd to impersonate the same user with "/netonly" and it then was able to access the Server B folder.
Now how do we achieve this programmatically? Any help would be really appreciate it!
Oct 06, 2016 06:40 AM|Cathy Zou|LINK
from your description, you want to access a folder in different sever on different domain. If that the case, I suggest you could try to use a Win32 API called WNetUseConnection. Please refer to the following link :
Hope this can help you.