Free Support Forum - aspose.com

Major Reading problems v2.8.0.0

This is the most frustrating problem cause it works in many cases, but not in 1 case for me.

This is all related to my web site, which reads in ms project files.

1. If I am working locally using visual studio 2008 it works just fine, no issues.
2. If i REMOTE DEBUG my web site, it works fine, no issues.
3. If I try to access my web site, I am getting read errors. Ie, it can’t read the file, it just pukes and returns nothing.
4. Spent a few days trying to figure out if it was me or the .dll
5. Finally figured it was v2.8.0.0.
6. Removed v2.8.0 and installed v2.7, and it works like it used to.

It almost seems like a security issue, and I say this because when I remote debug, it is running under my security model.

However, when it comes though IIS, it is a different user (NETSERVICES), and while permissions are there, something has clearly changed from v2.7.

Sorry I can’t be more specific, but something must have changed in your code from the 2 versions.

Hi,


I have tried to repeat the issue on my side but I could not.

The only difference with v2.7.0 that we have added possibility to update some data in MPP files so you have to have writing access to the file but it’s only when you are updating the data.

Could you please provide us with the error message and your system information like IIS version.

Sorry for inconvenience.

Hi,


To check the issue I have created a simple console application:

using System;

using Aspose.Tasks;

using Aspose.Tasks.Util;

namespace TestDuration

{

class Program

{

static void Main(string[] args)

{

License license = new License();

license.SetLicense("Aspose.Tasks.lic");

ProjectReader reader = new ProjectReader();

Console.WriteLine(string.Format("Project's format: {0}.",

reader.ReadProjectFileInfo("Sample Project.mpp").ProjectFileFormat));

Project project = reader.Read("Sample Project.mpp");

ChildTasksCollector collector = new ChildTasksCollector();

TaskUtils.Apply(project.RootTask, collector, 0);

foreach (Task task in collector.Tasks)

Console.WriteLine(string.Format("Task '{0}' has duration '{1}'.",

task.Name, task.Duration));

Console.WriteLine(project.GetType().Assembly.FullName);

ProjectWriter writer = new ProjectWriter();

writer.Write(project, "project.xml", TasksDataFormat.XML);

Console.ReadLine();

}

}

}


I have put the assembly in MyCodeGroup with two permissions only: execute and read/write access to disk D. If you don’t need to write the data the writing permission could be omitted as well.

And I still capable to run the application despite of the fact that the permission set does not allow me to debug it.

See screen shots attached.

Ok, here is more information for you:

1. Windows Server 2003 R2 x64 edition
2. IIS 6
3. Code to read file:

Dim license As New Aspose.Tasks.License
getProjTasks = New ds.projectTableDataTable
license.SetLicense(“Aspose.Tasks.lic”)
Dim fInfo As New FileInfo(fileLoc)
Dim ft As FileStream
If (Not fInfo.Exists) Then
myErrorMsg = “Unable to find file.”
Return Nothing
End If
Dim rdr As New ProjectReader
Dim proj As New Project()
Try
ft = New FileStream(fileLoc, FileMode.Open, FileAccess.Read)
proj = rdr.Read(ft)
Catch ex As Exception
myErrorMsg = ex.ToString
Return Nothing
End Try


4. Error message I am getting (note, Line 63 listed below is proj=rdr.read(ft))

System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt. at
x9d5a5f8cb1bea48a.x649397a477d1d1ed.x8a45cbf3f4b2c657(Calendar
xbe765e20f40b63d4, Byte[] x4a3f0a05c02f235f) at
x9d5a5f8cb1bea48a.x649397a477d1d1ed.x06b0e25aa6ad68a9(Calendar
xbe765e20f40b63d4, Hashtable x8f199855adaa4854, Byte[] x7201b70971f98378, Byte[]
xf9d37f33bce6fbd5, ArrayList xb1a5efd504c298ef) at
x9d5a5f8cb1bea48a.x591d41f772243d6b.x06b0e25aa6ad68a9(Project xb0108c8c2308c091,
Stream xcf18e5243f8d5fd3) at Aspose.Tasks.ProjectReader.Read(Stream stream) at
msProjectImporter.projReader.getProjTasks() in
E:\Bungie\Production\Tools\Projects\msProjectImporter\msProjectImporter\projReader.vb:line
63


Hi,


Thanks a lot for additional information.

Do you have the same exception for all MPP files or for some specific?

I should note, my files are all marked as READONLY when they are read via the web site. That might be the issue that is new, not sure.

All files that I have placed on the website and tried to read give me the same odd errors.

Did not occur with v2.7 - only with v2.8.

so something changed.

Hi,


Thank you a lot again.

I think the problem is on our side and we need some time to investigate it.

Sorry for inconvenience. Hope to be back soon.

Hi,


It looks that we have some problem with our obfuscator tool.

We can see a problem with 2.8.0 version only running under x64 OS and hosted to some process running in release mode only (like IIS working process when you not debug). Not for all MPP files but for big part of them.

I have created an interim build Aspose.Task 2.8.0.2. It is working well on my side. Could you please check it on your side?

Sorry for inconvenience and thank you for cooperation.

Now I am getting more errors:

Could not load file or assembly ‘Aspose.Tasks, Version=2.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
body {font-family:“Verdana”;font-weight:normal;font-size: .7em;color:black;}
p {font-family:“Verdana”;font-weight:normal;color:black;margin-top: -5px}
b {font-family:“Verdana”;font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:“Verdana”;font-weight:normal;font-size:18pt;color:red }
H2 { font-family:“Verdana”;font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:“Lucida Console”;font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

Server Error in '/' Application.

Could not load file or assembly 'Aspose.Tasks, Version=2.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Aspose.Tasks, Version=2.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 40:         End Try
Line 41: 
Line 42:         dt = projInfo.getStaffingInfo(True)
Line 43:         Session("ProjectInfo")=dt
Line 44:         If (IsNothing(dt)) Then

Source File: E:\Bungie\Production\Tools\Projects\BTools\BTools\HR\hrStaffReports.aspx.vb Line: 42

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Aspose.Tasks, Version=2.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'Aspose.Tasks, Version=2.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   msProjectImporter.projReader.getProjTasks() +0
   msProjectImporter.projReader.getStaffingInfo(Boolean showCurrent) +160
   BTools.hrStaffReports.Page_Load(Object sender, EventArgs e) in E:\Bungie\Production\Tools\Projects\BTools\BTools\HR\hrStaffReports.aspx.vb:42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

Hi,

I actually tried this version (2.8.0.2) ... it seems to load ok ... however, I needed to replace (remove and add) a reference to the new version. (in the My Project info).

HTH.

Regards, Bruce

Disregard my previous email it functions now.


Hi,


Thank you a lot for cooperation. I still not 100% sure where the BUG is but at least I can remove it.

Thank you again.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.