S
sjurba
Hi.
I have a created a chart on a webform using OWC. Everything is working
fine. But then I try something a little more spetcular: Handeling events
like afterrender and afterlayout etc. This also works when the chart is
rendered on the client side using the object-tag and putting the
afterrender method on the aspx file using vbscript.
But now i want to do the same on the server side, in the codebehind
(.vb) file, because I want to generate a gif image with custom drawings
that is streamed to the client.
I have followed the procedure in this article:
]http://support.microsoft.com/default.aspx?scid=kb;EN-US;328275[/ur-
l]
to generate the axowc10.dll.
Then I used the AxChartSpace class, following the example in this
article:
]http://support.microsoft.com/default.aspx?scid=kb;EN-US;319557[/ur-
l]
But as I am generating a gif to be streamed, i only have code in the
codebehind file, and I am instanciating the AxChartSpace
programmatically.
Then I have debuged myself through adding the aspcompat=true in the page
properties of the aspx file and then setting the apartment state to STA
in the vb-file.
Now I get this error message:
Exception of type InvalidActiveXStateException was thrown.
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.Windows.Forms.AxHost+InvalidActiveXStateException: Exception of type InvalidActiveXStateException was thrown.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidActiveXStateException: Exception of type InvalidActiveXStateException was thrown.]
AxMicrosoft.Office.Interop.OWC.AxChartSpace.get_Charts() +68
......
......
The error occurs on the first refrence to the chartspace:
oChart = oChartSpace.Charts.Add
I have been searching the internet for solutions can't find anything to
help me out. Does anyone have a tip with something I can try..?
All help would be truly appreciated!
Sjur
I have a created a chart on a webform using OWC. Everything is working
fine. But then I try something a little more spetcular: Handeling events
like afterrender and afterlayout etc. This also works when the chart is
rendered on the client side using the object-tag and putting the
afterrender method on the aspx file using vbscript.
But now i want to do the same on the server side, in the codebehind
(.vb) file, because I want to generate a gif image with custom drawings
that is streamed to the client.
I have followed the procedure in this article:
]http://support.microsoft.com/default.aspx?scid=kb;EN-US;328275[/ur-
l]
to generate the axowc10.dll.
Then I used the AxChartSpace class, following the example in this
article:
]http://support.microsoft.com/default.aspx?scid=kb;EN-US;319557[/ur-
l]
But as I am generating a gif to be streamed, i only have code in the
codebehind file, and I am instanciating the AxChartSpace
programmatically.
Then I have debuged myself through adding the aspcompat=true in the page
properties of the aspx file and then setting the apartment state to STA
in the vb-file.
Now I get this error message:
Exception of type InvalidActiveXStateException was thrown.
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.Windows.Forms.AxHost+InvalidActiveXStateException: Exception of type InvalidActiveXStateException was thrown.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidActiveXStateException: Exception of type InvalidActiveXStateException was thrown.]
AxMicrosoft.Office.Interop.OWC.AxChartSpace.get_Charts() +68
......
......
The error occurs on the first refrence to the chartspace:
oChart = oChartSpace.Charts.Add
I have been searching the internet for solutions can't find anything to
help me out. Does anyone have a tip with something I can try..?
All help would be truly appreciated!
Sjur