File.OpenRead()を使用して偽装がUNCパスで機能しないように見える理由はありますか?私はCodeProjectの偽装ユーティリティを利用しています:
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