Sign in to follow this  
Rahul Kumar

console appliacation for Server side image saving

Recommended Posts

I have developed a console application that try to make a fusuion chart image using the sample code you sended to me.

 

 

 

But when I do debug it I get the following exception from your code. Any tips why is that happening. when I used the library in a web context. it works fine. Only in the context of a console application it fails.

 

 

 

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

 

 

 

System.Windows.Forms

 

at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)

 

at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)

 

at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)

 

at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)

 

at System.Windows.Forms.AxHost.CreateInstance()

 

at System.Windows.Forms.AxHost.GetOcxCreate()

 

at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)

 

at System.Windows.Forms.AxHost.CreateHandle()

 

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

 

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

 

at System.Windows.Forms.AxHost.EndInit()

 

at Mamerto.ServerSideHandlerBase.initializeObjects() in mypathFusionChartsServerSideHandlerBase.cs:line 161

Share this post


Link to post
Share on other sites

The problem is located in the

 

 

 

initializeObjects() function in the ServerSideHandlerBase class library

 

when the code executes the following line:

 

shObj.EndInit();

 

 

 

Also it only occours when I call my library that used your library in a console application, with web application it works like a charm.

 

 

 

I'm totaly lost abotu what's going on.

Share this post


Link to post
Share on other sites

I am also receiving a "Class not registered.." error when I try server-side image conversion using your ServerSideImageHandler api.. This works in a local environment using the sample code you sent, however it results in this error in our production environment.

 

 

 

 

 

Exception: System.Exception

 

 

 

Message: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

 

 

 

StackTrace: at FusionCharts.ServerSideHandlerBase.initializeObjects()

 

at FusionCharts.ServerSideHandlerBase.setParameters(String swfPath, Int32 width, Int32 height, String dataXML, String dataURL, String imageFileName)

 

at FusionCharts.ServerSideHandlerBase.startProcessThread(Object oSSH)

 

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

 

at System.Threading.ExecutionContext.runTryCode(Object userData)

 

at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

 

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

 

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

 

at System.Threading.ThreadHelper.ThreadStart(Object obj)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this