GetWorkingFolder raise error

GetWorkingFolder raise error

stefan.palm
Advocate Advocate
1,247 Views
6 Replies
Message 1 of 7

GetWorkingFolder raise error

stefan.palm
Advocate
Advocate

Have an issue when using explorer utils. I have installed the servicepack for it: http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=17171058&linkID=9261341

 

Get error as the uploaded screen dumps, anyone knows why i get this error and what it means?

 

 

Thanks

 

0 Likes
Accepted solutions (1)
1,248 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

I am currently having the same problem

0 Likes
Message 3 of 7

Redmond.D
Autodesk
Autodesk

I can't reproduce on my end.  Can you do a ToString() on the Exception and post the results?  I want to see the full stack trace.

Also, what is the server name and vault name?



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes
Message 4 of 7

stefan.palm
Advocate
Advocate

Error retrieving working folderSystem.NotSupportedException: Den angivna sökvägens format stöds inte.   vid System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)   vid System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)   vid System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)   vid System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)   vid System.IO.FileInfo..ctor(String fileName)   vid Connectivity.Request.Vault.Request.WorkingFolders.LoadFromFile..ctor(String filePath)   vid Connectivity.Explorer.ExtensibilityRuntime.ExplorerUtil.GetWorkingFolder(Folder folder) 

 

ServerName = localhost

Vault Name = Vault

 

0 Likes
Message 5 of 7

Redmond.D
Autodesk
Autodesk

Interesting.  It seems that System.IO.FileInfo doesn't like the format of that path to WorkingFolder.xml.  Too bad the exception doesn't print out the actual path.  I'm assuming that the working folder feature works fine when you run Vault Explorer, right?

 

If so, the next step is to figure out why the IExplorerUtil would fail.  Can you post your code that creates and uses IExplorerUtil?  What application does the code run in?

 

 



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes
Message 6 of 7

stefan.palm
Advocate
Advocate

Workfolder works fine in vault explorer, that's correct. I have tested this code in both windows xp x32 and windows 7 x64.

 

The code for getting explorer-utils is below and it runs inside an 2012 jobprocessor extension. One suggestion is that this might be an vb.net only issue?

 

 

Public WebServiceManager As Autodesk.Connectivity.WebServicesTools.WebServiceManager = Nothing   

Public ExplorerUtils As Autodesk.Connectivity.Explorer.ExtensibilityTools.IExplorerUtil = Nothing

Public WorkFolderPath As String


 Sub New(ByVal credentials As Autodesk.Connectivity.WebServicesTools.IWebServiceCredentials)

Me.WebServiceManager = New Autodesk.Connectivity.WebServicesTools.WebServiceManager(credentials)        Me.WebServiceManager.ReSignIn = True

 

Me.ExplorerUtils = Autodesk.Connectivity.Explorer.ExtensibilityTools.ExplorerLoader.LoadExplorerUtil(credentials.ServerName, _                                   credentials.VaultName, credentials.SecurityHeaderInfo.UserId, credentials.SecurityHeaderInfo.Ticket)

 

Dim fld As Folder = Me.WebServiceManager.DocumentService.GetFolderRoot       

 

'This code raise the error

Me.WorkFolderPath = Me.ExplorerUtils.GetWorkingFolder(fld)

 

end sub

 

 

 

 

0 Likes
Message 7 of 7

Redmond.D
Autodesk
Autodesk
Accepted solution

How are you setting credentials.ServerName?

If you are setting it to be the full value of RemoteBaseUrl.ToString(), then that's your problem. If you look at the value, it's usually something like "http://localhost/AutodeskDM/Services/"

Although this value works fine for the WebServiceManager, LoadExplorerUtil expects just the server name.  So you need to use RemoteBaseUrl.Host to get just the server name.



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes