Community
Showing results for 
Search instead for 
Do you mean 
Reply

Simple VB framework

Tuned Listener
Posts: 11
Country: USA

Simple VB framework

I've been trying to use the VB_Fwk_Simple01 sample, but the ActFwk.LogOn triggers a "Protexis Type Initialization Exception".  I'm passing it a valid .PAD file path (when I don't, I get a file not found error).

 

Here's more error detail.

 

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.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, Boolean fireEvents, 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 VB_Fwk_Simple01.Form1.LoginToACTDatabase()

at VB_Fwk_Simple01.Form1.Button1_Click(Object sender, EventArgs e)

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Employee
Posts: 1,163
Country: USA

Re: Simple VB framework

Is act installed on the machine that's throwing this exception and are you able to login to the database?

 

 

Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 11
Country: USA

Re: Simple VB framework

Act 2010 is installed on the machine and I can log in and access the data fine. 

 

I get the same error no matter which database I try, or whether I call as LogOn(String xmlPADFile, String userName, String password) or LogOn(String userName, String password, String databaseHost, String databaseName)

 

The VB debugger seems to be indicating errors before logon is even called.

 

A first chance exception of type 'Act.Framework.PADObjectException' occurred in Act.Framework.dll

A first chance exception of type 'System.TypeInitializationException' occurred in Act.Framework.dll

System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>VB_Fwk_Simple01.vshost.exe</AppDomain><Exception><ExceptionType>System.TypeInitializationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The type initializer for 'Protexis.' threw an exception.</Message><StackTrace> 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, Boolean fireEvents, 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 VB_Fwk_Simple01.Form1.LoginToACTDatabase() in C:\consult\act\act8sdk\ACT!2006_Sample_Source_Code\VB_Fwk_Simple01\Form1.vb:line 79

at VB_Fwk_Simple01.Form1.Button1_Click(Object sender, EventArgs e) in C:\consult\act\act8sdk\ACT!2006_Sample_Source_Code\VB_Fwk_Simple01\Form1.vb:line 86

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)

at System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m)

at System.Windows.Forms.Button.WndProc(Message&amp;amp; m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)

at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)

at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

at VB_Fwk_Simple01.Form1.Main() in C:\consult\act\act8sdk\ACT!2006_Sample_Source_Code\VB_Fwk_Simple01\Form1.vb:line 7

at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.TypeInitializationException: The type initializer for 'Protexis.' threw an exception. ---&amp;gt; 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 ---

Employee
Posts: 1,163
Country: USA

Re: Simple VB framework

The reason I asked about the ability to login was because protexis is the licensing provider and normally if it has issues you wouldn't be able to get into the database either.

The best starting point might be to make sure the services is installed and running and if it is, then restart it and try connecting again. It'll be listed as Protexis Licensing V2 IIRC.
Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 11
Country: USA

Re: Simple VB framework

Protexis Licensing V2 is running.  I restarted it and tried again, but same error...
Tuned Listener
Posts: 11
Country: USA

Re: Simple VB framework

I got it working by adding

 

<PlatformTarget>x86</PlatformTarget>

 

to the .vbproj file.

 

Thanks.