Create new property fail

Hello, 

when I try to create new property I get exception that the Parameter is incorrect.

Here is my code:

 MFilesServerApplication app = new MFilesServerApplication();
MFServerConnection con = app.Connect(MFAuthType.MFAuthTypeSpecificMFilesUser, "*****", "****", "", "ncacn_ip_tcp", "*******", "*****");
VaultsOnServer vaults = app.GetOnlineVaults();
foreach (VaultOnServer vault in vaults) {
if(vault.Name == "MFiles") {
Vault myVault= app.LogInToVault(vault.GUID);
PropertyDefAdmin propDefAdmin = new PropertyDefAdmin();
propDefAdmin.PropertyDef = new PropertyDef();
propDefAdmin.PropertyDef.Name = "TEST";
PropertyDefAdmin p = myVault.PropertyDefOperations.AddPropertyDefAdmin(propDefAdmin, null);
}
}

Thank you a lot. 

Parents Reply Children