We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose Cells Server Configuration / Speed Issue

Hello,



We have a .Net project compiled and installed on a server. We can remotely login to the server and from a command line run the Aspose command and generate an excel file in a couple seconds.



So, we know the component is working.



Now, we log out of the system and execute the component in another way via a service. The service is running as SYSTEM. SYSTEM executes the Aspose module and we can see it running as a separate process. The process runs for over 60 seconds, no real CPU load or much change in the memory used. At the end of the 60 seconds the file is dropped into the IIS directory and it can be opened.



Question is: What could possibly be happening during that 60 seconds? If the same executable runs from the command line on the same system in just 2 seconds, why does it take 60 seconds when running as SYSTEM and how can we fix this or work around it?



Thank you for your ideas.

Hi,

Probably, it is a service overhead. Please make a simple test service and note down its timings. It will give you better statistics and good insight to look into this problem.

Hi,

Well, we think you should install Digital Certificate to work with it.
e.g
Select Aspose.Cells.dll file and then right click on it -> select Properties
Now, Select Aspose Pty ltd.... click on this detail, click on View Certificate button, then we can have Install Certificate button. So, you may click it to start the installation process.

Thank you.

Thank you,

Service is running. I launch the AsposeExport.exe from the service 10 times during the same session. So I'm guessing no overhead. The service runs the same command line that I type into cmd.exe when logged into the system. Product still works, but takes a long delay.

Below are the timings and the file sizes for each excel file export. The Aspose Export opens a txt file, puts into an excel file and saves the file to an IIS directory. Very simple, no formatting...

I monitor the AsposeExport.exe using task manager and I can see it starting and stopping with each execution.

Again, this runs super fast if logged into the console.

1st export: 10:47 (10kb)

2nd export: 10:48 (9 kb)

3rd export: 10:49 (11 kb)

4th export: 10:50 (11 kb)

5th export: 10:51 (8 kb)

6th export: 10:52 (11 kb)

7th export: 10:53 (10 kb)

8th export: 10:54 (11 kb)

9th export: 10:55 (8 kb)

10th export: 10:56 (8 kb)

Hello Amjad,

The test was run after installing the Digitial Certificate and it is the same.

What exactly is the purpose of installing the Certificate?

Do services need to be restarted? I'm guessing not because the service launches a clean execution of aspose each time an export is done. I know it checks the license file each time it is run.

If AsposeExport.exe process runs after the certificate is installed, what changes about the steps?

Thank you,

Jason

Hi,

I have requested the development team to give you advice to help solve your problem.

Also I have logged your question and created a ticket for this issue to keep its track. We will update you asap.

This issue has been logged as CELLSNET-40214.


Hi,

We have created a windows service and we have run it through service without any issue.

Please find the project inside the attachment.

If you still find an issue, please elaborate it and provide us more details.

Thank you for this service.

In fact, I am just using a normal Aspose component executable. I can send it in, but not on a public forum since it is commissioned/confidential work.

1) run from command line it runs perfect

2) run from windows scheduler as an administrator account, it takes 60 seconds with each call.

3) run from my service application by calling asposeExport.exe, it takes 60 seconds and shows in task manager as running as the same user as the service application.

However, I tried installing your service. I did not have an E: drive, so I changed it to D: and added an installer package. I created a D:\m folder. The service installation runs and works. But when I start the service it gives me this error in the event log:

Log Name: Application
Source: .NET Runtime
Date: 26/12/2011 09:18:42
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: FRSTM-2B123488H.vws.vh20.net
Description:
Application: WindowsService1.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean)
at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
at Aspose.Cells.Workbook.᫑(System.String, Aspose.Cells.LoadOptions)
at Aspose.Cells.Workbook..ctor(System.String)
at WindowsService1.thread.SaveLog()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()

Event Xml:
http://schemas.microsoft.com/win/2004/08/events/event">


1026
2
0
0x80000000000000

15311
Application
FRSTM-2B123488H.vws.vh20.net



Application: WindowsService1.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean)
at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
at Aspose.Cells.Workbook.᫑(System.String, Aspose.Cells.LoadOptions)
at Aspose.Cells.Workbook..ctor(System.String)
at WindowsService1.thread.SaveLog()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()


Log Name: Application
Source: .NET Runtime
Date: 26/12/2011 09:18:42
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: FRSTM-2B123488H.vws.vh20.net
Description:
Application: WindowsService1.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean)
at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
at Aspose.Cells.Workbook.᫑(System.String, Aspose.Cells.LoadOptions)
at Aspose.Cells.Workbook..ctor(System.String)
at WindowsService1.thread.SaveLog()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()

Event Xml:
http://schemas.microsoft.com/win/2004/08/events/event">


1026
2
0
0x80000000000000

15311
Application
FRSTM-2B123488H.vws.vh20.net



Application: WindowsService1.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at System.IO.__Error.WinIOError(Int32, System.String)
at System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean)
at System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
at Aspose.Cells.Workbook.᫑(System.String, Aspose.Cells.LoadOptions)
at Aspose.Cells.Workbook..ctor(System.String)
at WindowsService1.thread.SaveLog()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()


Hi,

It just a sample service.

You can create any xls , insert some data and then replace e:\m\test.xls with the new xls file path.

Also, we can make your thread private so that only you or Aspose Staff members with privileges could access it.

Ok, I see how it works.

However, it crashes after 100 files are created. Same problem on both systems.

Any ideas?

Log Name: Application
Source: Application Error
Date: 26/12/2011 10:58:56
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: FRSTM-2B123488H.vws.vh20.net
Description:
Faulting application name: WindowsService1.exe, version: 1.0.0.0, time stamp: 0x4ef83a18
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0x165c
Faulting application start time: 0x01ccc3b4bd3744d2
Faulting application path: C:\Program Files (x86)\Microsoft\AsposeServiceSetup\WindowsService1.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 38d8535a-2fa8-11e1-82cb-005056c00008
Event Xml:
http://schemas.microsoft.com/win/2004/08/events/event">


1000
2
100
0x80000000000000

15380
Application
FRSTM-2B123488H.vws.vh20.net



WindowsService1.exe
1.0.0.0
4ef83a18
KERNELBASE.dll
6.1.7601.17651
4e211319
e0434352
0000b9bc
165c
01ccc3b4bd3744d2
C:\Program Files (x86)\Microsoft\AsposeServiceSetup\WindowsService1.exe
C:\Windows\syswow64\KERNELBASE.dll
38d8535a-2fa8-11e1-82cb-005056c00008

Log Name: Application
Source: Application Error
Date: 26/12/2011 10:58:56
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: FRSTM-2B123488H.vws.vh20.net
Description:
Faulting application name: WindowsService1.exe, version: 1.0.0.0, time stamp: 0x4ef83a18
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0x165c
Faulting application start time: 0x01ccc3b4bd3744d2
Faulting application path: C:\Program Files (x86)\Microsoft\AsposeServiceSetup\WindowsService1.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 38d8535a-2fa8-11e1-82cb-005056c00008
Event Xml:
http://schemas.microsoft.com/win/2004/08/events/event">


1000
2
100
0x80000000000000

15380
Application
FRSTM-2B123488H.vws.vh20.net



WindowsService1.exe
1.0.0.0
4ef83a18
KERNELBASE.dll
6.1.7601.17651
4e211319
e0434352
0000b9bc
165c
01ccc3b4bd3744d2
C:\Program Files (x86)\Microsoft\AsposeServiceSetup\WindowsService1.exe
C:\Windows\syswow64\KERNELBASE.dll
38d8535a-2fa8-11e1-82cb-005056c00008

Hi,

It’s because Evaluation Version of Aspose.Cells has 100 file limit. It cannot create more files.

If you want to create more than 100 files, then you should set the license. Means, you should use Full Version.

Great. Thank you…
Adding the license works perfect.
I’ll try it on the server also and then
I will test a larger portion of the component we’ve created inside this service capsule.

    static public void SaveLog()
    {
        Aspose.Cells.License cellsLicense = new Aspose.Cells.License();
        cellsLicense.SetLicense(@"D:\Aspose\Aspose.Total.lic");
        while (true)
        {
            Workbook wb = new Workbook(@"c:\temp\test.xls");
            wb.Save(@"c:\temp\____" + DateTime.Now.Ticks + ".pdf");
            System.Threading.Thread.Sleep(1000);
        }
    }

Hi,

That’s good to know you are able to sort out this problem. If you need further help, please post on the related thread. We will help you asap.

Thank you so much for helping me with this. It is resolved.

I apologize for even disturbing the board here, because it seems what I have done is very simple, although I do not know .Net programming, Visual Studio 2010, or Aspose until today. I'm not sure if I can post a lessons learned, but the old components take 60 seconds and the new components are immediate.

1) Compiled for .Net 4.0 instead of .Net 3.5

2) Deprecated workbook functions were updated according to aspose documentation

3) License file was embedded in each project instead of being referenced via Environment variables on the disk. I know this was not the problem because I put the code back and it's still fast, but I see no reason to clutter the disk with additional files and file system calls, so I'm going to leave it embedded in the project.

Again, thank you for the service example. I hope to use it for scaling.

Hi,

It’s good to know that you problem is finally resolved.

Thanks for posting the valuable information, it will be helpful for the others.

If you have any other questions, please feel free to post, we will help you asap.