Hello,
- Aspose.Cells.dll (file version 8.0.0.0)
- Aspose.Words.dll (file version 14.3.0.0)
- Aspose.Total.lic
Hello,
Hi,
Thanks for your posting and using Aspose APIs.
Please first find what is your current directory. In console application you can find current directory using Environment.CurrentDirectory property. Suppose it returns something like F:\Temp\myDir, then it means you should place your license file inside F:\Temp\myDir. Once you will place the license in the current directory, this line of code will execute fine.
license.SetLicense(“Aspose.Total.lic”)
In case, you do not know the current directory path, then you can place license anywhere and give the absolute path instead of relative path. For example if your license file path is C:\exports\aspose\Aspose.Total.lic. Now your code should be like following
license.SetLicense(“C:\exports\aspose\Aspose.Total.lic”)
Hi,
Hi Stefano,
Thanks for your posting and using Aspose APIs.
Please try the following code now. I have attached the fixed .vb
file. It should fix your issue now.
VB.NET
'The following lines retrieve the absolute path of your license file
which is inside your virtual directory
Dim licPath = Server.MapPath("~\Bin\Aspose.Total.lic")
Dim license As Aspose.Cells.License = New Aspose.Cells.License()
license.SetLicense(licPath)
Hi,
Thanks for your email and using Aspose APIs.
Steual:
<span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;color:#1F497D” lang=“EN-US”>I have already read and test trust level solution without solving the problem.
<span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;color:#1F497D” lang=“EN-US”>In this moment I cannot use my Total.Aspose license !!!
I’m develpoing a Web application using this “environment” (on two different servers with the same issues):
SO: Windows Server 2008 R2 64bit SP1
development environment: Visual Studio 2005 Professional Edition
IIS: 7.5
Application pool configurazion for my web application:
– .NET Framework version : 2.0.50727
– Managed pipeline mode: Classic
– Enabled 32-bit version applications: TRUE
Aspose (Apsose.Total):
– Cells version: 8.0.0.0
– Word versione: 14.3.0.0
I have already tryed these “solutions”:
Let me know if you need more information!
Best,
Stefano
Hi,
Thanks for providing us the detail of your environment and using Aspose APIs.
We will work on this issue and update you asap.
Hello,
are there any news ?
Best
Stefano
Hi Stefano,
Thanks for your posting and using Aspose.Total.
This is not a license issue as we have communicated it before in emails. This is actually a permission issue. So far, we have tested it with Aspose.Cells at your end but now we ask you to test Aspose.Words, Aspose.Pdf and Aspose.Slides as well in your environment and let us know your feedback.
Here is the code for all the 4 components. You can test one by one and all together and give us your feedback. Please also read comments. I have also attached the .vb file for your reference.
Please do share your helpful screenshots as before for investigating the issue. Thanks for your cooperation in this regard.
VB.NET
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Diagnostics
’Imports System.Drawing
’Imports System.Drawing.Imaging
Imports System.IO
Imports System.Data
Imports System.Net
Imports Aspose.Words
Imports Aspose.Pdf
Imports Aspose.Slides
Imports Aspose.Cells
Namespace AsposeCells
Class Program
Public Shared Sub Main(ByVal args As String())
'Path of your license file
Dim licPath As String = “F:\Shak-Data-R\Aspose\License\Aspose.Total.lic”
'-----------------------------------------------------------------------------------
'Setting Aspose.Words license
Dim licWords As New Aspose.Words.License()
licWords.SetLicense(licPath)
'Testing Aspose.Words
'You can also give here path of your existing document
Dim doc As New Aspose.Words.Document()
'Document doc = new Document(“source.docx”);
Dim builder As New DocumentBuilder(doc)
builder.Writeln(“Best Stefano”)
doc.Save(“output.docx”)
'-----------------------------------------------------------------------------------
'Setting Aspose.Pdf license
Dim licPdf As New Aspose.Pdf.License()
licPdf.SetLicense(licPath)
'Testing Aspose.Pdf
'Create pdf document
Dim pdf1 As New Aspose.Pdf.Generator.Pdf()
'Instantiate License class and call its SetLicense method to use the license
Dim license As New Aspose.Pdf.License()
'license.SetLicense(“Aspose.Pdf.lic”);
'Add a section into the pdf document
Dim sec1 As Aspose.Pdf.Generator.Section = pdf1.Sections.Add()
'Add a text paragraph into the section
sec1.Paragraphs.Add(New Aspose.Pdf.Generator.Text(“Best Stefano”))
'Save the document
pdf1.Save(“output.pdf”)
'-----------------------------------------------------------------------------------
'Setting Aspose.Slides license
Dim licSlides As New Aspose.Slides.License()
licSlides.SetLicense(licPath)
'Testing Aspose.Slides
'Instantiate Presentation
Dim pres As New Presentation()
'Get the first slide
Dim sld As ISlide = DirectCast(pres.Slides(0), ISlide)
'Add an AutoShape of Rectangle type
Dim ashp As IAutoShape = sld.Shapes.AddAutoShape(ShapeType.Rectangle, 150, 75, 150, 50)
'Add ITextFrame to the Rectangle
ashp.AddTextFrame(“Best Stefano”)
'Save the presentation to disk
pres.Save(“output.pptx”, Aspose.Slides.Export.SaveFormat.Pptx)
'-----------------------------------------------------------------------------------
'Setting Aspose.Cells license
Dim licCells As New Aspose.Cells.License()
licCells.SetLicense(licPath)
'Testing Aspose.Cells
'You can also give here path of your existing excel file
Dim wb As New Workbook()
wb.Worksheets(0).Cells(“A1”).PutValue(“Best Stefano”)
wb.Save(“output.xlsx”)
End Sub
End Class
End Namespace
Hello,
Hi Stefano,
Please follow the steps below.
1. Make sure if the root cause of this issue is not the same as described in this topic Exception: cannot find license file.
2. If point 1 does not fix the issue, please load the license file in a stream and then load the license from stream.
If nothing works for you, please share your application including license to reproduce the issue.
Best Regards,
Hello,
please see attached sample
Best,
Stefano
Hi Stefano,
Your application does not contain any license or DLLs. When I add reference to Aspose.Words and Aspose.Cells and use my license, I do not see any issue.
Please share your application in running form where I do not have to reference any DLL and use my license. You have used the license path 'C:\Test\Aspose.Total.lic', please change it to 'Aspose.Total.lic' and put the license file and DLLs in Bin folder and then share the application if it does not work at your end.
Best Regards,
I’m attacching sample project with the same issue
Hi Stefano,
Sorry, I was not able to reproduce this issue using your application. It successfully finds the license file from Bin folder. The only issue I was able to notice was Save methods were throwing 'access denied' exception. To resolve this issue, your application was copied to inetpub\wwwroot folder, full control was given to IIS users and save path was changed to the following
doc.Save(Server.MapPath("/AsposeTest/App_Data") & "/AsposeTestoutput.docx")
Please try this and let us know if you still get any exception. We will have to access your system to resolve it if you are still facing the same issue.
Best Regards,