Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UpdateFileCategories - throwing 303 error

7 REPLIES 7
Reply
Message 1 of 8
tom_angert
413 Views, 7 Replies

UpdateFileCategories - throwing 303 error

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.

7 REPLIES 7
Message 2 of 8
Redmond.D
in reply to: tom_angert

Check to make sure you are not loggin-in as read-only.  http://justonesandzeros.typepad.com/blog/2011/06/signinreadonly-and-error-303.html

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 8
tom_angert
in reply to: Redmond.D

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);

Message 4 of 8
Redmond.D
in reply to: tom_angert

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.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 5 of 8
tom_angert
in reply to: Redmond.D

It works fine interactively with the same credentials.
Message 6 of 8
Redmond.D
in reply to: tom_angert

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.

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 7 of 8
tom_angert
in reply to: Redmond.D

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.

 

Message 8 of 8
tom_angert
in reply to: tom_angert

I was adding the wrong ID to my list to pass into UpdateFileCategories.  The call works well when you pass it good values...:)

 

Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report