Eval Version Locking up file... file in use error


#1

I think I have successfully got the forms component working… with one small problem. After it has written the PDF file it locks it up and says it is still in use. If I shut down the WWW service and restart it then it works fine.

Currently I am using a Windows XP Pro server running IIS. I have given the Network Service Modify permissions to the C:\windows\system32\inetsrv directory and I have downloaded and installed 1.0.2.2 (1.0.2.3 does not download from the link available).

Can anybody suggest how to fix this? Oh on a side note this is the eval version… just need to make sure that this is going to work and that the client is going to pay for it over and above what I quoted them. This thing is very simple to use and I think its going to be perfect!

Thanks
Corey


#2

Dear Corey10e,

Thanks for considering Aspose.

1.About the pdf is still used by another process, maybe you set the input and output file name as a same file. Note that they are must be not the same one.

2.About the access to the directory "C:\WINNT\system32\", I have fix that problem. Aspose.Pdf.Form 1.0.2.4 is published, you can read the blog and download the setup or hotfix here.

Best regards.


#3

Version 1.0.2.4 fixed the temp problem. But the "Access denied" and 'file in use' problems remain. Note the output file does get updated, it just remains locked. I am reading from one file and saving to another file :
Dim form As Form = New Form("c:\testForm.pdf", "c:\output.pdf")

Here is the first error message:
Access is denied
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.ComponentModel.Win32Exception: Access is denied

Source Error:


Line 54: form.FlattenField("sngText")
Line 55: 'Save the changes.
Line 56: form.Save()
Line 57:
Line 58: End Sub

Source File: c:\inetpub\wwwroot\TestExtraReportWeb\WebForm1.aspx.vb Line: 56

Stack Trace:


[Win32Exception (0x80004005): Access is denied]
System.Diagnostics.PerformanceMonitor.GetData(String item)
System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String[] categories, Int32[] categoryIndexes)
System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib library)

[InvalidOperationException: Couldn't get process information from remote machine.]
xf4d3b3c3247c35ae.x1bcfda1125bafd7a.AddLogomark(Stream xdc4cce4a2fe6be69, Stream x0ecec17af75ebd13, String x98cba3afcf80dd03, Single x08db3aeabb253cb1, Single x1e218ceaee1bb583)
Aspose.Pdf.Form.Form.Save()
TestExtraReportWeb.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\TestExtraReportWeb\WebForm1.aspx.vb:56
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()




#4

As far as I can tell the 1.0.2.4 fixed my problems.

Thanks
Corey


#5

Dear johns,

Thanks for considering Aspose.

I have read your error message seriously. It seems that the internal function “AddLogomark()” has an error. But in Version 1.0.2.4, all the operations about the pdf file in Form.Save() or AddLogomark() are implemented with temporary Stream. There is no temp disk file to be created and after leaving the Save(), the output pdf has been closed.

So, I have two suggestions:
1. Check whether you have correctly downloaded and setuped the latest version 1.0.2.4 of Aspose.Pdf.Form.
2. Could you send me a small example which can make the error recur so that I can locate the problem quickly?

Wait for your response.
Best regards.


#6

Dear johns,

I have just read a post in Aspose.Pdf.Kit, maybe it can help you.
This is the post http://www.aspose.com/forums/ShowPost.aspx?PostID=16279.

Best regards.