Message 1 of 10
vault login with API
Not applicable
12-21-2011
05:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to run the C# VaultFileBrowser sample program in the vault 2012 SDK. Everything compiles ok, but when I run it and try to log in, I always get an error saying 'Error: Logon Failed'. I am using exactly the same login info as when I normally log into the Vault. Does anybody have any idea of what could be going on?.
The line that throws the exception is this:
ServiceManager = new WebServiceManager(new UserPasswordCredentials(
loginInfo.ServerString, loginInfo.Vault, loginInfo.Username, loginInfo.Password));I have a working program that uses the older way of logging in:
public static void InitServices()
{
secSrv.SecurityHeaderValue = new Autodesk.Connectivity.WebServices.SecuritySvc.SecurityHeader();
secSrv.Url = "http://" + HOST + "/AutodeskDM/Services/SecurityService.asmx";
secSrv.SignInReadOnly("lorne", "lorne", "Vault");
docSrv.SecurityHeaderValue = new Autodesk.Connectivity.WebServices.DocumentSvc.SecurityHeader();
docSrv.SecurityHeaderValue.UserId = secSrv.SecurityHeaderValue.UserId;
docSrv.SecurityHeaderValue.Ticket = secSrv.SecurityHeaderValue.Ticket;
docSrv.Url = "http://" + HOST + "/AutodeskDM/Services/DocumentService.asmx";
propSvc.SecurityHeaderValue = new Autodesk.Connectivity.WebServices.PropertySvc.SecurityHeader();
propSvc.SecurityHeaderValue.Ticket = secSrv.SecurityHeaderValue.Ticket;
propSvc.SecurityHeaderValue.UserId = secSrv.SecurityHeaderValue.UserId;
propSvc.Url = "http://" + HOST + "/AutodeskDM/Services/PropertyService.asmx";
}I notice that with this code I am signing in as read-only, could that be what is causing the login to fail in the sample program?
