السلام عليكم
تحية طيبة اما بعد
اود الوصول الى مجلد على الشبكة والنسخ منه واليه ، من خلال كود VB.NET او C# وعليه صلاحية مستخدم وكلمة مرور .
انا استخدمت
الكود التالي بلا منفعة
System.Security.Principal.WindowsIdentity identity;
identity = System.Security.Principal.WindowsIdentity.GetCurrent();
System.Security.Principal.WindowsPrincipal principal;
principal = new System.Security.Principal.WindowsPrincipal(identity);
//extra stuff
DirectoryEntry de = new DirectoryEntry("\\192.168.0.108\\folder", "username", "123456");
foreach (DirectoryEntry child in de.Children)
{
directory_textBox.AppendText(child.SchemaClassName + ": " + child.Name + "\n");
}