Page 1 of 1
Object reference not set to an instance of an object.
Posted: Fri Jun 16, 2006 3:17 pm
by 8123522
When I run my Visual Studio 2005 project locally, it works fine. When I copy to my web server, which is a Windows 2003 server I get:-
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 12: <form id="form1" runat="server">
Line 13: <div>
Line 14: <tchart:WebChart ID="WebChart1" runat="server" AutoPostback="False" Config="xx"
Line 15: TempChart="File" BorderStyle="Solid" BorderWidth="1px" Width="265px" />
Line 16: </div>
I have checked the teechart.dll and also the licenses.licx is on the server
Any suggestions?
Posted: Mon Jun 19, 2006 8:41 am
by narcis
Hi MikeTheLad,
Could you please have a look at Tutorial17 - Designtime Runtime and License Requirements tutorial? Tutorials are available at TeeChart's program group.
If problems persists don't hesitate to post them here.
Posted: Mon Jun 19, 2006 9:32 am
by 8123522
I have followed chapter 17, I have changed from File to Session mode, works locally fine, but not on the server, error below:-
NullReferenceException: Object reference not set to an instance of an object.]
Steema.TeeChart.FrAccessProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions) +171
System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey) +259
System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license) +41
System.ComponentModel.LicenseManager.Validate(Type type, Object instance) +29
Steema.TeeChart.Chart..ctor() +79
Steema.TeeChart.Web.WebChart..ctor() +105
ASP.salesgraph_aspx.__BuildControlWebChart1() in c:\Inetpub\wwwroot\salesgraph.aspx:14
ASP.salesgraph_aspx.__BuildControlform1() in c:\Inetpub\wwwroot\salesgraph.aspx:12
ASP.salesgraph_aspx.__BuildControlTree(salesgraph_aspx __ctrl) in c:\Inetpub\wwwroot\salesgraph.aspx:1
ASP.salesgraph_aspx.FrameworkInitialize() in c:\Inetpub\wwwroot\salesgraph.aspx.cs:912307
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +40
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.salesgraph_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\26676eb7\92c7e946\App_Web_9g4wide_.24.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Posted: Mon Jun 19, 2006 9:59 am
by narcis
Hi MikeTheLad,
Can you please read the messages below and check if any of the described cases coincides with yours?
http://www.teechart.net/support/viewtopic.php?t=3859
http://www.teechart.net/support/viewtopic.php?t=2538
Posted: Mon Jun 19, 2006 10:22 am
by 8123522
I have now updated the registry on the server as per one of the notes
[HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET]
"DesignKey"="Steema.TeeChart.TChart is a licensed component."
And I am now getting a new error:-
An instance of type 'Steema.TeeChart.Chart' was being created, and a valid license could not be granted for the type 'Steema.TeeChart.Chart'. Please, contact the manufacturer of the component for more information.
My licenses.licx looks like:-
Steema.TeeChart.Web.WebChart, TeeChart, Version=1.1.2004.16592, Culture=neutral, PublicKeyToken=9c8126276c77bdb7
I have tried the fle in the bin and root folder of my website
Posted: Mon Jun 19, 2006 1:00 pm
by 8123522
Have run TeeRegister on the server and now works fine.
Posted: Tue Jun 20, 2006 7:53 am
by Marc
Hello,
TeeRegister sets up a designtime license on the server (hence setting up the server as a designtime machine). That should not be necessary as the compiled web application should be autonomous and completely portable, running correctly without any license registry key or licenses.licx file installed on the server.
To check whether the license is correctly compiled into your application you can modify the registry line in the machine where you compile the application:
Code: Select all
[HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET]
"DesignKey"="Steema.TeeChart.TChart is a licensed component."
invalidating it to:
Code: Select all
[HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET]
"DesignKey"="xxxxSteema.TeeChart.TChart is a licensed component."
I am assuming from the information in these posts that you are running TeeChart for .NET version 1.
If the application reports a license compile error then the license was being correctly compiled into the application, if not then, assuming the teechart.dll file is the same on both designtime machine and server, it's possible that:
- the licenses.licx file is not part of the project as an embedded resource
or
- the licenses.licx file has invalid content
Regards,
Marc Meumann