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

Free Support Forum - aspose.com

Problem deploying to intranet server

I am currently evaluating the Aspose.Cells for NET component for using in our intranet. I have been able to get everything running interactively in the Visual Studio environment, but when I attempt to deploy a test application to my intranet server I receive the error below.

I am working in VB.NET using Visual Studio 2010. I am developing on a Windows 7 64bit machine and deploying to a Windows Server 2003 64bit.

I turned on the assembly binding log after receiving the first part of the error and the notice that logging was turned off.

My executable is located in C:\inetpub\intranet and so is a copy of the Aspose.Cells.Dll file.

Can anyone shed some light on what the issue might be?

Thank You

Unhandled Exception: System.TypeInitializationException: The type initializer for ‘cgiTest.modCurrentBalance’ threw an exception. —> System.IO.FileNotFoundException: Could not load file or assembly ‘Aspose.Cells, Version=, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified.
File name: ‘Aspose.Cells, Version=, Culture=neutral, PublicKeyToken=716fcc553a201e56’
at cgiTest.modCurrentBalance…cctor()

=== Pre-bind state information ===
LOG: User = WEBSERVER1\Administrator
LOG: DisplayName = Aspose.Cells, Version=, Culture=neutral, PublicKeyToken=716fcc553a201e56
LOG: Appbase = file://?/c:/inetpub/intranet/
LOG: Initial PrivatePath = NULL
Calling assembly : cgiTest, Version=, Culture=neutral, PublicKeyToken=null.
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Aspose.Cells, Version=, Culture=neutral, PublicKeyToken=716fcc553a201e56
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells.DLL.
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells/Aspose.Cells.DLL.
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells.EXE.
LOG: Attempting download of new URL file://?/c:/inetpub/intranet/Aspose.Cells/Aspose.Cells.EXE.

— End of inner exception stack trace —
at cgiTest.modCurrentBalance.GenerateReport()
at cgiTest.Module1.ProcessFunction()
at cgiTest.Module1.Main()

Thanks for providing us some details about your issue.

I suspect you might be using Aspose.Cells component in Partial trust or medium trust security level at your Server. Generally, all Aspose .NET components require Full Trust permissions set. The reason is, Aspose .NET components need to access registry settings, system files other than virtual directory for certain operations like parsing fonts etc. Moreover, Aspose .NET Components (including Aspose.Cells for .NET) are based on core .NET system classes that also require Full Trust permissions set in many cases. We recommend to use the product in Full Trust security level. However you may still try to use Aspose.Cells on Partial trust permissions set following a few recommendations. For complete reference please see the document:

Let us know if you still find any issue.

Thank you.

I added code to my project to return the current trust level and this is what it returned:

Current trust Level=600

According to what I can find that is Unrestricted and is the highest level. Is there some other setting I need to be looking at for the trust level?


Could you check the document for reference, it may help you a bit:

Thank you.

Hello Amjad,

Thanks for the link, but it seems to apply to ASP.NET applications. This is a console application writing to the standard output so there is no web.config file.


Could you please check if you have Aspose.Cells Assembly registered in your GAC @ server. There might be some conditions to make it work e.g
1 - Strong name
2 - Add it to GAC
3 - Add it to your .Net framework (e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727).
Please add it to GAC and check whether it can work.

Thank you.

I was finally able to get this to work by setting up a MyResolveEventHandler and specifying the actual location of the DLL in the routine. I am not certain why it was necessary but it worked.

However, I am now experiencing a problem in a different part of my test program. When I am attempting to save an Excel file I receive the error:
“Object reference not set to an instance of an object.” I access properties of the object up until this point, but when i attempt to save the spreadsheet, I receive this error.

However, I am now experiencing a problem in a different part of my test program. When I am attempting to save an Excel file I receive the error:
"Object reference not set to an instance of an object." I access properties of the object up until this point, but when i attempt to save the spreadsheet, I receive this error.

It might be either an issue with your code or a bug in the product' version. Could you create a separate sample console application, zip it and post it here to reproduce the issue on our end, we will check your issue soon.

Moreover, I recommend you to kindly try our latest fix/version: you may download it here: Aspose.Cells for .NET v7.4.2.2

Thank you.

This attachment reproduces the error on my system.

I am trying to create a drop in intermediary between my existing code that uses Excel automation and the Aspose cells product so I can just replace the references to Excel with the intermediary and have it communicate with Aspose.Cells to have it create the workbooks.


Thanks for the sample project.

After an initial test, I can notice the exception “Object reference not set to an instance of an object” on Workbook.Save() method using the sample code/project you have shared here.

Well, we need to thoroughly investigate and look into the issue if if there is something to do with your code which is a bit complex or it is a bug/issue with our product. For the sake of investigation, I have logged a ticket with an id “CELLSNET-41534” for your issue. Our concerned developer will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.


Please change your codes of setting default style. e.g

'Dim Default_Style As Aspose.Cells.Style =

'Default_Style.Font.Name = DefaultFont

'Default_Style.Font.Size = DefaultFontSize

oWB = New Aspose.Cells.Workbook

Dim Default_Style As Aspose.Cells.Style = oWB.DefaultStyle

Default_Style.Font.Name = DefaultFont

Default_Style.Font.Size = DefaultFontSize

oWB.DefaultStyle = Default_Style

It will fix your issue and you may use it as a workaround. And we will fix this issue soon.

Thank you.

Thank you. That solved the problem.


Thanks for your posting and using Aspose.Cells.

We are pleased to know that solution works for you. If you face any other issue, please feel free to post on our forums, we will be glad to help you more.


Thanks for your posting and using Aspose.Cells for .NET.

We have fixed the issue.

Please download and try this fix: Aspose.Cells for .NET v7.4.2.3 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-41534) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.