02-16-2014 08:11 AM - edited 02-16-2014 08:12 AM
The following codes has worked well in earlier versions of Act!. Since Act! v16 it works no longer. Has something changed with v16?
Private Sub LogonToAct()
Dim ActFwk As New ActFramework
If Not ActFwk.IsLoggedOn Then
Try
ActFwk.LogOn("C:\Users\Administrator\Documents\ACT\ACT Data\Databases\ACT2014Demo.PAD", "Chris Huffman", "")
Catch ex As Exception
Me.TextBox1.Text = ex.ToString
End Try
End If
End Sub
The errormessage is:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Protexis.ֻ' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2)
at Protexis.ֻ..cctor()
--- End of inner exception stack trace ---
at Act.ProtexisProvider.ProtexisProvider.GetMachineCode(String serialNumber)
at Act.ProtexisProvider.ProtexisProvider.GetSerials(UInt32& totalUsers)
at Act.ProtexisProvider.ProtexisProvider.GetSerialNumbers()
at Act.ProtexisProvider.ProtexisProvider.get_SerialNumbers()
at Act.ProtexisProvider.ProtexisProvider..ctor()
--- End of inner exception stack trace ---
at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel)
at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture, LogonTrack tracklogon)
at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, LogonTrack tracklogon)
at Act.Framework.ActFramework.LogOn(String xmlPADFile, String userName, String password)
at ACT_ToolBox.Form1.LogonToAct()
Thanks for any advices!
02-24-2014 11:36 PM
Matthew,
Thank you for the hint, because the machine is x64 architecture, I had to choose the compile options for x64 platform, then the plugin works fine.
02-19-2014 04:55 AM
What version of .Net and what processor is being targeted? Should be 4 and x86.
02-24-2014 11:36 PM
Matthew,
Thank you for the hint, because the machine is x64 architecture, I had to choose the compile options for x64 platform, then the plugin works fine.