View previous topic :: View next topic |
Author |
Message |
newyuppie
Joined: 07 Nov 2006 Posts: 12 Location: San Diego, CA, USA
|
Posted: Sun Nov 12, 2006 9:07 pm Post subject: Error: Invalid length for a Base-64 char array |
|
|
hi,
im using vb2005, and ILS3.3.1
i have imported the whole Infralution.Licensing_VB project into my own because i needed to make some changes and didnt want to mess with the original.
I get an exception: Invalid length for a Base-64 char array
System.FormatException was unhandled
Message="Invalid length for a Base-64 char array."
Source="mscorlib"
StackTrace:
at System.Convert.FromBase64String(String s)
at MyLicensing.EncryptedLicenseProvider.SetParameters(String licenseParameters) in C:\Documents and Settings\usuario\Escritorio\INFRALUTION\ILS3\Source\Infralution.Licensing_VB\EncryptedLicenseProvider.vb:line 241
at MyLicensing.EncryptedLicenseProvider.ValidateLicenseKey(String licenseParameters, String licenseKey) in C:\Documents and Settings\usuario\Escritorio\INFRALUTION\ILS3\Source\Infralution.Licensing_VB\EncryptedLicenseProvider.vb:line 550
at LicensedApp_VB.MainForm.OnLoad(EventArgs e) in G:\Archivos de programa\Infralution\Infralution Licensing System\Samples\VS2005\VB\LicensedApp\MainForm.vb:line 99
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at LicensedApp_VB.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
this happens exactly at this line: _rsaParameters.Modulus = Convert.FromBase64String(modulus)
of the Public Shared Sub SetParameters(ByVal licenseParameters As String) |
|
Back to top |
|
|
newyuppie
Joined: 07 Nov 2006 Posts: 12 Location: San Diego, CA, USA
|
Posted: Sun Nov 12, 2006 9:15 pm Post subject: |
|
|
im using the LicensedApp example, haven't changed the license parameters.
Const LICENSE_PARAMETERS As String = _
"<LicenseParameters>" & _
" <RSAKeyValue>" & _
" <Modulus>rzRJ6dZ4ZTJ8/EzFtq2XIaik7QBSc24b8i8KJrPaxXGiCMDFcj8JtEFePa1SYX1W3cQoiwvCAF/MYmkXto74WdApYzILel+bOHSaUXTImrxpPtykNhPD7fF3PEXxrLRrTjUWQyEX5+XSaNPstmbDJw/Zg83mraCfmGeLcsiEypM=</Modulus>" & _
" <Exponent>AQAB</Exponent>" & _
" </RSAKeyValue>" & _
" <DesignSignature>GJYsK2rQE7uj539+QCyJ3Z2GyrNEZQNxruxOQR6P2jo+Ze3Ev5Kgbf3N33RaLf7oEUsZNF4Gv7w5UFgYcdHzCphqznt4vcR++u9tb0sC5m6hf26538GXhkNodyVR9FDcv1AX4+PaM/kY+Z8mrMMmC148lYPpCHypXvgjOmDd9oQ=</DesignSignature>" & _
" <RuntimeSignature>coZIUnOTaRZCIa67HBMM6/xbkQNYS+l4ROeLmzn7SqRamBwP7cbfOEAsxlFV2roKlY6oz1B91/PYcTVPLfWahwjHaiAaLjKAosXK41yZOozu0vRWpv4H9ERiEli0pYX0M8fMBIkvSDT6n9X9T/6U4ujyefv8b4IxbYsB3zsjjx0=</RuntimeSignature>" & _
" <KeyStrength>7</KeyStrength>" & _
"</LicenseParameters>" |
|
Back to top |
|
|
newyuppie
Joined: 07 Nov 2006 Posts: 12 Location: San Diego, CA, USA
|
|
Back to top |
|
|
newyuppie
Joined: 07 Nov 2006 Posts: 12 Location: San Diego, CA, USA
|
Posted: Sun Nov 12, 2006 9:50 pm Post subject: |
|
|
as a side note:
Using the License Tracker, create a new product and use my custom generator (ive sent via email). check out the License Parameters generated, the modulus has a length of 163 in my test. on the other hand, the modulus that came in the parameters of the original LicensedApp example has a length of 161. Both lengths produce the exception i posted first, Base-64 not being appropriate in length.
sorry for posting so much...
PA |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Nov 12, 2006 10:26 pm Post subject: |
|
|
There is indeed an issue with the VB source code in the current release. We have emailed you a fix for this and will post a new release ASAP _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Nov 13, 2006 2:43 am Post subject: |
|
|
Version 3.3.2 has now been released and includes a fix for this _________________ Infralution Support |
|
Back to top |
|
|
|