Standalone app: clmloader.dll configuration for window-form applications

Standalone app: clmloader.dll configuration for window-form applications

Anonymous
Not applicable
1,344 Views
4 Replies
Message 1 of 5

Standalone app: clmloader.dll configuration for window-form applications

Anonymous
Not applicable

In Vault 2017, licensing moved to the Clic framework.

 

I done a window-forms application that connect to Vault INDIPENDENTLY from the official Vault Professional Client.

This application works fine from 2015 to 2016. With 2017...i have some problem.

 

I'm not able to connect to the server - it fails immediatly with a 'Autodesk.Connectivity.WebServices.VaultLicenseException'.

I have checked ALL the dlls references, also the infamous clmloader.dll :-)....without any good news.

 

So, to avoid to lose more time, i tried the VaultList example - just to connect to the server....and i discovered that also it fails to connect.
After some tries, i finally discovered that the machine needs the client installed.

 

Here there is my code

Dim flags As VDF.Vault.Currency.Connections.AuthenticationFlags = VDF.Vault.Currency.Connections.AuthenticationFlags.Standard
Dim results As VDF.Vault.Results.LogInResult = VDF.Vault.Library.ConnectionManager.LogIn(server, vaultDB, user, password, flags, Nothing)

 

>>>> results.Success FAILS

 

Here the Exception

 

Autodesk.Connectivity.WebServices.VaultLicenseException non è stata gestita
  Actor=""
  ErrorCode=319
  HResult=-2146233087
  Lang=""
  LicenseErrorCode=18
  Message=Generata eccezione di tipo 'Autodesk.Connectivity.WebServices.VaultLicenseException'.
  MessageId=""
  Node=""
  Role=""
  Source=mscorlib
  Stack=""
  StackTrace:
    Server stack trace:
       in Autodesk.Connectivity.WebServices.ServiceBase`1.ServiceProxy`1.Invoke(MethodInfo methodInfo, Object[] args, TServiceInterface obj)
       in Autodesk.Connectivity.WebServices.RealProxy`1.Invoke(IMethodCallMessage methodCallMsg, MethodInfo methodInfo, InvokeDelegate invokeFunc)
    Exception rethrown at [0]:
       in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       in Autodesk.Connectivity.WebServices.IInformationService.GetSupportedProducts()
       in Autodesk.Connectivity.WebServices.InformationServiceBase.GetSupportedProducts_()
       in Autodesk.Connectivity.WebServices.InformationServiceBase.GetSupportedProducts()
       in Autodesk.Connectivity.WebServicesTools.WebServiceManager.WebServiceCredentials_SignIn()
       in Autodesk.Connectivity.WebServicesTools.WebServiceManager.SignIn()
       in Autodesk.Connectivity.WebServicesTools.WebServiceManager..ctor(IWebServiceCredentials credentials, Boolean reSignIn, Boolean autoTransferOwnership, Int32 timeout)
       in Autodesk.Connectivity.WebServicesTools.WebServiceManager..ctor(IWebServiceCredentials credentials)
       in VaultList.Form1.button1_Click(Object sender, EventArgs e) in C:\Program Files (x86)\Autodesk\Autodesk Vault 2017 SDK\vs15\VB\VaultList\Form1.vb:riga 55
       in System.Windows.Forms.Control.OnClick(EventArgs e)
       in System.Windows.Forms.Button.OnClick(EventArgs e)
       in System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       in System.Windows.Forms.Control.WndProc(Message& m)
       in System.Windows.Forms.ButtonBase.WndProc(Message& m)
       in System.Windows.Forms.Button.WndProc(Message& m)
       in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       in Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       in VaultList.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:riga 81

 

 

Is there a way to avoid this problem? We have more than 50 pc that needs this small read-only application to speak with Vault - it's quite impossible to install the Vault Professional Client on ALL pc. If yes, so why the SDK has the LogIn commands anymore?
Maybe is enough to copy some specific DLLs?

 

Any help is really appreciated

 

Dave

0 Likes
1,345 Views
4 Replies
Replies (4)
Message 2 of 5

psaarloos
Collaborator
Collaborator

Hi Paola,

 

If you need a writeable connection to Vault, I am pretty sure you need to install Vault Client on the machine to have the Clic licensing set up correctly. If you need just a read-only connection there are some possibilities with the app.config of your application. Can you point out what your application does?

Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi Pim,

first of all thanks for your answer.

 

My application works in read-only mode in the 90% of the time - sometimes needs a writeable mode.

My program is the internal business management, which integrates perfectly with the Vault using the 2015 and 2016 dlls.

With these new ones a new problem has come to life.

 

I've tried your past solutions playing with the xml file, without success.
My CLEAN scenario is: take the VaultList example that comes with the SDK, and try to make it works on a new machine that have no Vault Client installed.

My suspect is that the client has inside the "Clic-procedure" to acquire the license....hard-coded in one hidden form.

 

As i said i have 50+ pc (for now) that are connected together with our business software: some in the office and others in the workshop; so...do you agree with me that it's impossible to install EVERYWHERE the Vault Client? I have also a numerical control machine (in the workshop) that do the checkin and checkout of drawings in a completely automated mode, without using the client, but consuming a license (correct! In fact that machine has a personal reserved license cause it's a foundamental piece of our workshop)...but now it stops to work alone, needs a lot of help....and we lose a lot of time...and money.

 

If Autodesk will release an update of his SDK (both 2017 and...2018?) that permits to connect both in read and read/write mode, i think all could be better and more and more transparency.

 

It's ugly to say, but the administration said that in the current situation the software is likely to become an obstacle rather than a help, and is willing to look at other solutions if the manufacturer (Autodesk) will not find a solution to this bug of poor programming.Smiley Embarassed

I'm sure you will understand me Pim Smiley Wink

I do not want to discuss Autodesk's commercial choices here but just look for a solution to my problem without getting drastic Smiley Sad

 

Have a nice day

 

- Dave

0 Likes
Message 4 of 5

psaarloos
Collaborator
Collaborator

Hi Paola,

 

I agree with you it became more complicated to set up a Vault connection. I believe the main reason is to have the Clic licensing system in all Autodesk product making the licensing experience and possibilities consistent. There are also very good things about the new licensing; previously if you opened two writeable connections from the same system (aka Vault Client and Job Processor) using different credentials, your system would use two Vault licenses. With the new mechanism this is reduced to one license, because the license is given to your system instead of a Vault user.

 

A readonly connection to Vault without Vault client installed can be achieved by the method i described in other posting in combination with an installation of a required Microsoft component. I tested it with the Vault List sample and it works! 🙂

 

1) Download the attached sources

2) Change the credentials in the code

3) Installing the required component: Microsoft Visual C++ Redistributable for 2015 (link)

4) Run the application (it takes a while before the content of Vault List is loaded)

 

One other thing to mention: You could also just keep using the 2016 version of your application. It should still be able to logon a Vault 2017 or Vault 2018 server.

 

Hope it helps!

Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes
Message 5 of 5

Anonymous
Not applicable

Hi Pim,

after 2 or 3 hours my last post i finally makes the VaultList project works well in read only mode - however thanks for your suggestion.

 

The real problem is another: probably thew new Clic license framework works better (for the 2017 version cause a didn't try the 2018 yet) with two writeable connections previously opened, but surely doesn't work as the SDK API help says.
I already know all what you wrote - also that the 2016 version could connect until the 2018 version...but this could be good for very little and simply software, not for us. For example: we don't use the Job Processor beacuse it requires a lot of resources, and prevents you from working with inventor at the same time, unless you have DeepBlue as a computer - we have a special and different Job Processor that i made, which is more powerful and, most of all, it's completely autonomus....plus other application and heavy softwares that i cannot explain.

 

I've tried to implement a two-way class to connect to Vault (one in read-only and another in writeable mode), but it's quite impossible beacuse the software cannot write itself the config file during start - and if it could be possibile, do you agree with me that is very far from what the API HELP says Smiley Frustrated

 

Also could be a resource drain (as well as ugly) to maintaine two forks of the same software, without a valid motivation.This is not a valid motivation or a usual bug as we know ... this is Autodesk's conceptual bug, which is more serious than others because it loses our time and money without a real and real advantage.

 

Thank you for the support you provided, but unfortunately does not solve my problem:
I'm amazed that although we have already reported this from the beginning, there has never been a formal response from Autodesk, especially for the high cost of licenses and software.

We've been involved with our reseller, and we'll probably open a case to Autodesk if we do not find a solution ... or we'll migrate to a different PLM. Unfortunately, when you lose money and resources, the decisions, right or wrong, are taken, and also quickly.

 

However thanks for your answers - i really appreciated them

 

 

Davide Pregnolato
R&D Engineer
ICT dpt., Bonino Global

 

minilogo.png

 

 

0 Likes