Page 1 of 1

License problem when using VB.Net 2005 Publish option

Posted: Thu Oct 05, 2006 11:59 am
by 9092632
I have an application that I deploy using the Publish method in VB.Net 2005.
When I run the application, I get the following error:


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Steema.TeeChart.FrAccessProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at Steema.TeeChart.Chart..ctor()
at Steema.TeeChart.TChart..ctor()
at WinderLog.ALChartForm.InitializeComponent()
at WinderLog.ALChartForm..ctor()
at WinderLog.JumboInfoForm.ProfileButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at DevExpress.XtraEditors.BaseButton.OnClick(EventArgs e)
at DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraEditors.BaseControl.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
WinderLog
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/cbHCarr/Local%20Settings/Apps/2.0/W19RV27D.KEV/51V0MYQ6.7DA/wind..tion_9a4cc43f9099b841_0001.0000_e7dc651f28d273a5/WinderLog.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
DevExpress.Utils3
Assembly Version: 3.2.5.0
Win32 Version: 3.2.5.0
CodeBase: file:///C:/Documents%20and%20Settings/cbHCarr/Local%20Settings/Apps/2.0/W19RV27D.KEV/51V0MYQ6.7DA/wind..tion_9a4cc43f9099b841_0001.0000_e7dc651f28d273a5/DevExpress.Utils3.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
DevExpress.XtraGrid3
Assembly Version: 3.2.5.0
Win32 Version: 3.2.5.0
CodeBase: file:///C:/Documents%20and%20Settings/cbHCarr/Local%20Settings/Apps/2.0/W19RV27D.KEV/51V0MYQ6.7DA/wind..tion_9a4cc43f9099b841_0001.0000_e7dc651f28d273a5/DevExpress.XtraGrid3.DLL
----------------------------------------
DevExpress.XtraEditors3
Assembly Version: 3.2.5.0
Win32 Version: 3.2.5.0
CodeBase: file:///C:/Documents%20and%20Settings/cbHCarr/Local%20Settings/Apps/2.0/W19RV27D.KEV/51V0MYQ6.7DA/wind..tion_9a4cc43f9099b841_0001.0000_e7dc651f28d273a5/DevExpress.XtraEditors3.DLL
----------------------------------------
DevExpress.Data3
Assembly Version: 3.2.5.0
Win32 Version: 3.2.5.0
CodeBase: file:///C:/Documents%20and%20Settings/cbHCarr/Local%20Settings/Apps/2.0/W19RV27D.KEV/51V0MYQ6.7DA/wind..tion_9a4cc43f9099b841_0001.0000_e7dc651f28d273a5/DevExpress.Data3.DLL
----------------------------------------
TeeChart
Assembly Version: 2.0.2456.16162
Win32 Version: 2.0.2456.16162
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/TeeChart/2.0.2456.16162__9c8126276c77bdb7/TeeChart.dll
----------------------------------------

As a test, I used the tradition create Setup Application and installed the app, and the Chart works.

How can I get the Application to work using the Publish Method?

Posted: Thu Oct 05, 2006 1:49 pm
by narcis
Hi CBDevelopers,

Could you please read this thread about a very similar issue?

Thanks in advance.

Posted: Thu Oct 05, 2006 2:01 pm
by 9092632
I'm using a Windows Application not a Web App.

The app is set to work offline so all the dll's ets are on the computer in question.

As you can see in the debug list, the TChart.dll is the correct version.

Checked the .Net tutorial and the license file is correct. I guess this information is complied in the exe as I have no issues with other vendor dll's (the devexpress listed).

??

Posted: Thu Oct 05, 2006 2:24 pm
by narcis
Hi CBDevelopers,

It doesn't matter, have you checked that the license file is properly compiled in your application as told in that thread?

Posted: Thu Oct 05, 2006 2:35 pm
by 9092632
This is the lines from the exe provided by ildasm on the executable - manifest section.

.assembly extern TeeChart
{
.publickeytoken = (9C 81 26 27 6C 77 BD B7 ) // ..&'lw..
.ver 2:0:2456:16162
}

Posted: Thu Oct 05, 2006 9:56 pm
by Marc
Hello,

We've checked the steps on VSNET2005 to publish a TeeChart project. Putting TChart on a Winform and compiling as 'publish' works ok on the development machine and on a remote machine (no designtime license installed) to confirm correct functioning of the runtime license.

If the Chart is visible on a form, ie. dragged from the tool palette, it should have created the licenses.licx file when it was created. That project when compiled should function correctly, you could check that on your machine, a basic project of that type setup and compiled is a good indication of whether licensing is correctly setup on a machine. TeeChart should have been installed by the installer to the development machine or the TeeReg tool on the customer download page should have been used to install the Designtime license.

The manifest output you have sent is correct but is not an indication of whether the license is correctly installed or not. It serves to indicate that the teechart assembly is correctly referenced.

Looking for reasons as to why your own project may not be working:
- If the Chart is non visible at designtime, created by code via a button click or similar (the stack trace you sent indicates that may be the case) then, if the licenses.licx file is not correctly setup in the compiling project then licensing will fail. You should check the steps in Tutorial 17 relating to licenses.licx and it's contents. A quick step to correctly setup licenses.licx is to delete it from the project and drag a TeeChart to a form from the tool palette. The licenses file will automatically be created. You can then delete the Chart if it's not needed.
- If the assembly that houses TeeChart is called via another assembly (the case here?) then licensing will fail if the calling assembly does not include the TeeChart licensing line in its own licenses.licx file

Please let us know if further checks based on these comments bring us new information.

With thanks.
Regards,
Marc Meumann

Posted: Tue Oct 10, 2006 10:44 am
by 9092632
Thanks for your help.

When I first built the application, I used the demo version of the DLL. When I received the full version, I uninstalled the demo, and then installed the full.

I used the clean solution, and then the rebuild solution. After deploying the application, I was still getting the error.

I then made all the forms I created with the chart 'dirty'. After compiling and running the app, I noticed a few subtle changes to the apperance - notibly the custom axes where shown properly and not stacked as previous.

Publishing this time worked.