Trying to update a category for a file. I'm using the master id and am logged in as Administrator and I consistently get the 303 error.
conn.WebServiceManager.DocumentServiceExtensions.UpdateFileCategories(
new long[] { MasterID },
new long[] { CategoryId },
"Change Category");
Any suggestions?
Thanks.
Check to make sure you are not loggin-in as read-only. http://justonesandzeros.typepad.com/blog/2011/06/signinreadonly-and-error-303.html
Nope...I'm using this to login...
VDF.Vault.Results.LogInResult results = VDF.Vault.Library.ConnectionManager.LogIn(VaultServer,
VaultVault, VaultUser, VaultPassword, VDF.Vault.Currency.Connections.AuthenticationFlags.Standard, null);
Try the same operation in the Vault client and see if you get the same error. Log in as the same user and perform the same category chagne on the same file.
I've run some tests, and UpdateFileCategories works fine for me. The only way I can reproduce a 303 error is with a read-only login or with a user that doesn't have File Change Category permission.
The next thing I can think of to try is call another admin call, such as CategoryService.AddCategory and see if that also returns a 303 error. If so, then it's related to the login or user permissions.
You can get the list of permissions for the logged-in user by calling AdminService.GetPermissionsByUserId. The Connection object has the user ID value you need to pass in.
Wayne requested some sample code so I went and put together a simple project to throw a file into $ and set the category on it. That call to set the category works for me. The only thing that jumps out as being fundamentaly different in my sample project and my actual project is that I'm creating the folder that I'm inserting the file into and attempting to set the category on. Makes me think that I've got a permissions issue on the newly created folder. I haven't had a chance to test it yet, but will post here when I verify to close the loop on this.
I was adding the wrong ID to my list to pass into UpdateFileCategories. The call works well when you pass it good values...:)
Thanks.