Message 1 of 6
Not applicable
01-23-2012
11:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I played around with the listfiles example in the Vault sdk and struggled, like a lot of others i think. With getting the windows login to work. i made it at an inventor addin and here is what worked for me. but how do i ensure a proper logout? any help appreciated
regards.
kent boettger
Private Const HOST As String = "srv-pdm" '"localhost"
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
'RunCommandNormalLogin(HOST)
RunCommandWinLogin(HOST)
End Sub
Public Sub RunCommandWinLogin(ByVal serverName As String)
'Login with Windows User login
Dim winAuthSvc As WinAuthService = New WinAuthService()
winAuthSvc.Url = "http://" + serverName + "/AutodeskDM/Services/WinAuth/WinAuthService.asmx"
winAuthSvc.UseDefaultCredentials = True
winAuthSvc.SecurityHeaderValue = New WinAuthSvc.SecurityHeader()
winAuthSvc.SignIn("Vault")
Dim docSrv As DocumentService = New DocumentService()
docSrv.SecurityHeaderValue = New Autodesk.Connectivity.WebServices.DocumentSvc.SecurityHeader()
docSrv.SecurityHeaderValue.UserId = WinAuthSvc.SecurityHeaderValue.UserId
docSrv.SecurityHeaderValue.Ticket = WinAuthSvc.SecurityHeaderValue.Ticket
docSrv.Url = "http://" + serverName + "/AutodeskDM/Services/DocumentService.asmx"
Dim login As WinAuthCredentials = New WinAuthCredentials(serverName, "Vault")
Using serviceManager As New WebServiceManager(login)
Try
Dim root As Folder = docSrv.GetFolderRoot()
Me.m_listBox.Items.Clear()
PrintFilesInFolder(root, docSrv)
Catch ex As Exception
MessageBox.Show(ex.ToString(), "Error")
End Try
End Using
End Sub
Solved! Go to Solution.

