Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > .NET WinForms > Task Panel
  New Posts New Posts RSS Feed - [solved] System.InvalidOperationException, license
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] System.InvalidOperationException, license

 Post Reply Post Reply
Author
Message
redoc View Drop Down
Newbie
Newbie


Joined: 22 March 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote redoc Quote  Post ReplyReply Direct Link To This Post Topic: [solved] System.InvalidOperationException, license
    Posted: 27 October 2016 at 7:34am
I have a VB.NET project with single form that contains a single Task Panel and no other controls or code, other than setting the XtremeTaskPanel.TaskPanelGlobalSettings to the information in my LIC file (based on a post that I read from the Articles and Tutorials page on this website) and I'm using a registered copy of the CodeJock products, v17.

When I run the compiled application on my development computer everything runs fine, but when I run it on any other computer whether it's 32bit or 64bit regardless of which OS it's running I receive a System.InvalidOperationException exception before the form ever loads.  I've copied the Codejock.TaskPanel.v17.2.0.ocx file into the EXE path and registered it, as well as copying both the AxInterop.XtremeTaskPanel.dll and Interop.XtremeTaskPanel.dll files into the same path. 

I assume I need to include some other files with the EXE but I'm not sure what they would be.
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 28 October 2016 at 10:59am
Hello,

I suppose that you forgot to include information about license. You can hardcode the first 3 lines of a .LIC file during either application initialization (Sub Main) or form initialization, it's important to make it before any other interaction with the component. Below is example for CommandBars (VB.NET Code) from documentation:
Public Sub New()

  MyBase.New()

  Dim CommandBarsSettings As _
    XtremeCommandBars.CommandBarsGlobalSettingsClass = _
    New XtremeCommandBars.CommandBarsGlobalSettingsClass

  CommandBarsSettings.License = "CommandBars Control Copyright (c) " + _
  "2003-2014 Codejock Software" + ControlChars.CrLf + "PRODUCT-ID: " + _
  "Codejock.CommandBars.ActiveX.v16.3" + ControlChars.CrLf + _
  "VALIDATE-CODE: XXX-XXX-XXX-XXX"

  'This call is required by the Windows Form Designer.
  InitializeComponent()

  'Add any initialization after the InitializeComponent() call
End Sub


You will need to provide the correct Product Id and Validate Code. This information can be found in the LIC file. The LIC file is located in the same location as the OCX file. By default, the location of the OCX and LIC file is the "..\Codejock Software\ActiveX\Xtreme Suite\Bin" for the Suite Pro installation. This code should be placed in the Form_Initialize event of the main form. 

IMPORTANT: The LIC must match EXACTLY down to carriage returns, line feeds and CASE, this is one of the most common mistakes made when embedding license information. The other common mistake is to not replace the "X"'s in the sample code or not updating the license information when upgrading versions.

Or you need to copy .LIC file to application location.

Regards,
 Oleksandr Lebed
Back to Top
redoc View Drop Down
Newbie
Newbie


Joined: 22 March 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote redoc Quote  Post ReplyReply Direct Link To This Post Posted: 28 October 2016 at 11:04am
Hi Oleksandr,

As I mentioned in my post I did include the license information in the initialization of the form for the XtremeTaskPanel.TaskPanelGlobalSettings, exactly as it shows in the LIC file but that didn't resolve the problem.

I did hear from support at CodeJock this morning and they suggested including the LIC file in the same path as the OCX and that has resolved the problem.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.152 seconds.