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: 

Is a message on failed login possible?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
michael.collins2
449 Views, 3 Replies

Is a message on failed login possible?

Is it possible to get a message on a failed login, such as

 

- license limit has been reached

- Vault database not found

- username and password not found

 

Thanks

Mike

 

PS I am using the WebServiceManager in Vault Professional 2013.

 

3 REPLIES 3
Message 2 of 4

If something goes wrong with the login, you will get an exception when creating the WebServiceManager object.  Errors from the Vault server will have an error code.

http://justonesandzeros.typepad.com/blog/2011/11/getting-the-restriction-codes.html

 

If you want a human readable message, you will have to convert the error code to a human readable string.  You can provide you own messages or copy them from the SDK documentation.

http://justonesandzeros.typepad.com/blog/2012/01/better-error-messages.html

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 4

So for login errors, am I on the right path with something like:

 

try

{

    m_serviceManager =

    new WebServiceManager(newUserPasswordCredentials(

         server, vault, username, password, true));

}

 

catch (Exception ex)

{

  string errorCode;

  List<string> restrictionCodes;

     GetErrorAndRestrictionCodesString(ex, out errorCode, out restrictionCodes);

} 

Message 4 of 4

Yes, that should work.  You can test it out pretty easliy.  Just log in with a bad password.



Doug Redmond
Software Engineer
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report