Hi
This is the code I already have
void Application_Start(object sender, EventArgs e) {
String mapPath = Server.MapPath("~");
String filePath = System.IO.Directory.GetParent(System.IO.Directory.GetParent(mapPath).FullName).FullName;
String wordLicPath = filePath + "\\AsposeLic\\Aspose.Words.lic";
String pdfLicPath = filePath + "\\AsposeLic\\Aspose.Pdf.lic";
// Code that runs on application startupmayur123
Aspose.Words.License AsposeWordlic = new Aspose.Words.License();
AsposeWordlic.SetLicense(wordLicPath);
Aspose.Pdf.License PDFlicense = new Aspose.Pdf.License();
System.IO.FileStream pdfFileStream = new System.IO.FileStream(pdfLicPath, System.IO.FileMode.Open);
PDFlicense.SetLicense(pdfFileStream);
I get the following error
==================================================
9:28:30 AM 11/17/2011 : File Path isC:\Inetpub\wwwroot
9:28:30 AM 11/17/2011 : WordLicPath isC:\Inetpub\wwwroot\AsposeLic\Aspose.Words.lic
9:28:30 AM 11/17/2011 : PdfLicPath isC:\Inetpub\wwwroot\AsposeLic\Aspose.Pdf.lic
9:28:30 AM 11/17/2011 : An error occured: on 11/17/2011 9:28 AM
Exception Message: Access to the path 'C:\Inetpub\wwwroot\AsposeLic\Aspose.Pdf.lic' is denied.
Exception Source: mscorlib
Exception StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at ASP.global_asax.Application_Start(Object sender, EventArgs e)
Exception TargetSite: WinIOError
9:28:30 AM 11/17/2011 : An error occured: on 11/17/2011 9:28 AM
Exception Message: Access to the path 'C:\Inetpub\wwwroot\AsposeLic\Aspose.Pdf.lic' is denied.
Exception Source: mscorlib
Exception StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at ASP.global_asax.Application_Start(Object sender, EventArgs e)
Exception TargetSite: WinIOError
===========================================================================
So it seems there are some additional permissions that needs to be set on the AsposeLic folder and the Aspose.words.Lic and Aspose.PDF.Lic
Could you please let me know what additional permissions needs to be set for the Licence to be set.
Mayur