在web.config中配置能够实现.
但是在程序中.只能模拟本机的帐户,请问如果登录网上邻居的共享.
[DllImport("advapi32.dll", SetLastError = true)]
public static extern bool LogonUser(String lpszUsername, String lpszDomain, String lpszPassword,
int dwLogonType, int dwLogonProvider, ref IntPtr phToken);
这个API好像不能访问其它电脑.
但是在程序中.只能模拟本机的帐户,请问如果登录网上邻居的共享.
[DllImport("advapi32.dll", SetLastError = true)]
public static extern bool LogonUser(String lpszUsername, String lpszDomain, String lpszPassword,
int dwLogonType, int dwLogonProvider, ref IntPtr phToken);
这个API好像不能访问其它电脑.
你这是要访问服务器的能连接到的其它主机上的共享??有种办法不需要你写登录代码:管理员直接映射盘符