VisualVault SDK

 

Code Examples Overview and Authentication

 

Step One: Reference VVRuntime.dll from your Visual Studio project

 

To use the VisualVault API you must first create a reference in your Visual Studio project to VVRuntime.dll.  

 

VVRuntime.dll is a web services "proxy" that allows you to develop applications that are not deployed on the same web server as the VisualVault web application.  The runtime assembly makes web service calls and optimizes the communications for speed.

 

For instructions on configuring your project to use the web services proxy (VVRuntime.dll) please review the VisualVault Overview-Architecture topic.   

 

The quickest way to get started is to download the sample Visual Studio projects.  

 

Download the Visual Studio 2008 example projects here

 

 

Step Two: Review code examples found in this documentation

 

The Vault object is the main entry point into VisualVault's API. Once authenticated, a Vault object is returned and provides access to the many objects that make up the API. For example, to gain access to the Library object, which provides access to the Folders and Document objects, you must first create an instance of the Vault object by authenticating with a VisualVault server.  Authentication is accomplished by calling one of the static Login methods which return a vault object.

 

Step Three: Authenticate with the VisualVault API

 

VisualVault will authenticate users against four types of providers: VisualVault Database, Active Directory, Windows NT, and Novell eDirectory.  When authenticating with VisualVault you must supply a user ID and password of a user object that already exists in the VisualVault database.  A new default installation of VisualVault has one user "vault.admin" and "password" is the password.  The vault.admin user is a member of the vault.access group which grants full access to its members.

 

Once you have authenticated using the vault.admin user credentials, you can create additional users and groups using the code examples provided.

 

 

 

[C#]

 

using System;

using System.Windows.Forms;

using VVRuntime;

 

namespace VisualVault.ExamplesCs.Authentication_Examples

{

    /// <summary>

    ///

    /// </summary>

    public partial class Authenticate : Form

    {

        /// <summary>

        ///

        /// </summary>

        public Authenticate()

        {

            InitializeComponent();

        }

 

        private void btnLogin_Click(object sender, EventArgs e)

        {

            AuthenticateUser(txtServerURL.Text, txtUserID.Text, txtPassword.Text);

        }

 

        private void AuthenticateUser(string serverURL, string userID, string password)

        {

            var vault = VVRuntime.Authenticate.Login(serverURL, userID, password);

 

            if (vault != null)

            {

                //make some API calls

            }

        }

    }

}