Free Support Forum - aspose.com

System.Management.ManagementException: Access denied

I am working with the evaluation copy of PDF.Kit Version 2.1.2.1

I've tested my code out locally and it works fine, but when I upload the code and the dll to my ISP using ASP.NET 2.0, I get the following error:

System.Management.ManagementException: Access denied

This occurs when I use the following code:

Dim StudentField As String = "Ash[0].Detail[0].Student[0]"

PDFForm.FillField(StudentField, username)

If I use the back button in my browser and re-do the operation then everything now works perfectly. The problem only seems to occur when I try the FillField the first time after logging on.

Can anyone help please?

Thanks

Brian

Dear Brian,

Please be sure that you have the permission to access that directory.

To start IIS Manager from the Computer Management window

  1. From the Start menu, right-click My Computer, and click Manage.
  2. In the console tree, expand the Services and Applications node.
  3. Click Internet Information Services. The names and states of your Web sites appear in the details pane.
  4. In the console tree, expand the Internet Information Services node and any subsequent Web site nodes to see a list of directories and virtual directories for that Web site.

Best regards,

Yes, I defintely have read & write access into that directory. Bear in mind that the directory is on my ISP site, so using IIS isn't an option.

The intersting point is that when I use the back button in my browser and re-do the operation, everything works. The error only occurs the first time after logon.

Brian

Dear Brain,

I just ran an ASP.NET application doing the FillField method, everything works fine. Here are my pieces of advice,

  1. Please directly access a file (without any usage of Aspose.Pdf.Kit)to ensure if this strange error is caused by the settings of ASP.NET,
  2. Please try to use the latest version Aspose.Pdf.Kit to see what will happen. http://www.aspose.com/Downloads/Aspose.Pdf.Kit/2.1.3.0/Default.aspx
  3. If you still get the error, please send the FORM document to kevin.zuo@aspose.com. We will try to reproduce the same error and respond you soon.

Best regards,

Hi

I'm using the following code to access the pdf file. I should mention that I'm using FileEditor.Append to build the pdf file before I manipulate the fields within it.

The FileEditor.Append command is working perfectly, it's the Fillfield I have the problem with. This code is in a Subroutine called from a LinkButton. If I catch the error first time through, exit the Sub and then click on the LinkButton again the code works perfectly.

Regards

Brian

Dim FileEditor As PdfFileEditor = New PdfFileEditor()

FileEditor.Append(strPath & "Master_" & question & ".pdf", strPath & "Master_Answer.pdf", 1, NumAnswerPages, TempPathname)

Dim PDFForm As Form = New Form(CType(TempPathname, String), strPath & filename & ".pdf")

Try

Dim StudentField As String = "Ash[0].Detail[0].Student[0]"

PDFForm.FillField(StudentField, username)

PDFForm.SetFieldAttribute(StudentField, FieldFlag.READ_ONLY)

Dear bdubw,

Could you please provide all the resources which can reproduce the same error?

It is very hard for me to discover reasons with blind experiences.

You can send all resources to kevin.zuo@aspose.com.