How can i get the name of the user who has modified a file,
How can i create versions of a file,
How can i view previous versions of a file,
How can i create a new user account,
Finally how can i create history folder
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hemant SrivastavaPosted Jan 11, 2013, 1:18 AM
http://stackoverflow.com/questions/11660235/find-out-usernamewho-modified-file-in-c-sharp
Hemant SrivastavaPosted Jan 11, 2013, 1:16 AM
public string CreateUserAccount(string ldapPath, string userName,
string userPassword)
{
try
{
string oGUID = string.Empty;
string connectionPrefix = "LDAP://" + ldapPath;
DirectoryEntry dirEntry = new DirectoryEntry(connectionPrefix);
DirectoryEntry newUser = dirEntry.Children.Add
("CN=" + userName, "user");
newUser.Properties["samAccountName"].Value = userName;
newUser.CommitChanges();
oGUID = newUser.Guid.ToString();
newUser.Invoke("SetPassword", new object[] { userPassword });
newUser.CommitChanges();
dirEntry.Close();
newUser.Close();
}
catch (System.DirectoryServices.DirectoryServicesCOMException E)
{
//DoSomethingwith --> E.Message.ToString();
}
return oGUID;
}
Reference:
http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C#40
Hemant SrivastavaPosted Jan 11, 2013, 1:14 AM
string showVersion = vi.FileVersion;