1
File.OpenRead()를 사용하여 가장이 UNC 경로에서 작동하지 않는 이유가 있습니까? 내가 사용하고 있습니다 CodeProject's Impersonation utility :UNC 경로를 사용하는 File.OpenRead 액세스. 명의 도용이 작동하지 않습니까?
OpenRead()에 전달하는 공유 권한이있는 사용자가 있습니다.
이 내 코드이며 파일에 접근 아니에요 :
try
{
bool canImp = imp.ImpersonateValidUser(impUser, domain, impPwd);
FileStream fs = File.OpenRead(filePath);
logger.Debug("File stream opened...");
byte[] b = new byte[fs.Length];
fs.Read(b, 0, b.Length);
fs.Close();
// code continued