I recently “virtualized” my production webserver. When I bring up our website on the virtual machine I get an error:
Type ‘Aspose.Pdf.Document’ is not defined.
The site is a mirror of production. I’m not exactly sure what to look for outside of the obviouis. The license file is referred to correctly and is in the right location. Any advice?
The system is Windows 2003 Server, IIS 6. The app is running in .Net V 2.0.x
Dim pdfLicenseName As String = "C:\Inetpub\wwwroot\CDCVentures.Net\Licenses\Aspose.pdf.lic"
Dim asposePDFLicense As Aspose.Pdf.License = New Aspose.Pdf.License()
asposePDFLicense.SetLicense(pdfLicenseName)
Hi Erick,
Thanks for using our products and sharing the sample source code with us.
There is no issue in source code provided by you. I am afraid about the issue you are facing. Please try to set the license as an embedded resource. Kindly visit Using as Embedded resource for more details and code snippet.
Please feel free to contact support in case you need any further assistance.
Thanks & Regards,
Rashid,
Thank you for your reply…
The virtualized web server is not having Visual studio installed. Is there any way we can try out the setting without Visual studio.We tried to setup the License in following way in global.asax but not worked.
Dim pdfLicenseName As String = (Path of License file)
asposePDFLicense.SetLicense(pdfLicenseName)
asposePDFLicense.Embedded = True
We think the aspose.pdf.dll in Bin folder of application is not getting referred for some reason.However other components like aspose.words, aspose.cells are getting referred.
apose.pdf.dll version is 6.7.0.0.
Regards,
Harshal S
Hi Harshal,
Thanks for using our products.
HarshalSS:
The virtualized web server is not having Visual studio installed. Is there any way we can try out the setting without Visual studio.We tried to setup the License in following way in global.asax but not worked.Dim pdfLicenseName As String = (Path of License file)
asposePDFLicense.SetLicense(pdfLicenseName)
asposePDFLicense.Embedded = True
Apparently it seems fine, can you please test the same code on any machine where Visual Studio environment is available or share the same code with us. This will help us to figure out the exact issue and get the cause of the issue soon.
HarshalSS:
We think the aspose.pdf.dll in Bin folder of application is not getting referred for some reason.However other components like aspose.words, aspose.cells are getting referred.
I tested the scenario using Aspose.Pdf for .NET v7.0, after placing the Aspose.Pdf.dll in Bin folder and unable to find any issue while accessing it. Kindly use the latest version of Aspose.Pdf for .NET v7.0 and check if it works fine at your end.
We apologize for your inconvenience.
Thanks & Regards,