1

My goal is to get a status of the signature field in a PDF file that has CoSign signature fields (signed and unsigned). I need all fields not just the last signed field.

I have created a WCF endpoint (using C# VS2013 and the ARX SAPI API) to read all of the CoSign signature fields in a PDF. This works fine on two of my three SharePoint 2013 servers. The file is accessed by the WCF endpoint using the UNC path to the file in the SharePoint server document libraries. I am able to access all the files on all three servers via any Windows 7 file browser without any issues.

I have copied known good files across the servers and tested them all with the same result. On the problem server SAPISignatureFieldEnumInit returns error 1878850044. I cannot find any information on this error in the SAPI documentation.

I am hoping someone might have come across this before and have some guidance or helpful insight.

1 Answers1

1

The hex value of -1878850044 is 0x90030604, and you can find what this value means in the API documentation:

0x90030604 - "Failed to open the file. Check the file path and the user permissions on this file."

Make sure your WCF service has sufficient permissions to access this file/folder (e.g. if the service is hosted in IIS, then you should give its ApplicationPoolIdentity read permissions to that folder).

Almog G.
  • 817
  • 7
  • 11
  • Thank you Almog for claryfying the hex conversion and for including the link to the API. This confirms what I suspected ... (a security issue). – Ben Rosales Jan 12 '15 at 15:44
  • So testing continues. We set the service up on the problem server and then set the application pool to use the server farm account (which is an existing account used for all web services on the farm) but we continue to receive the same error (hex value of -1878850044 is 0x90030604). – Ben Rosales Jan 12 '15 at 22:19
  • Problem has been identified. It was a path issue. The problem server is only a dev server not meant for general users. It uses a URL of something like http//company.com:XXXXX/site_path where ":XXXXX" is the port number (note the colon). I did not take into account the port number with the colon. Originally, when I programatically converted the URL to a UNC file path, the port information remained as ":XXXXX" (again note the colon). After converting this colon to an "@" in the UNC path for use by the SAPI DLL, the problem was resolved. – Ben Rosales Jan 26 '15 at 14:04
  • So now, the UNC path passed to the DLL looks something like \\company.com@XXXX\site_path\doc_library\file.pdf. I lilkey should have include a samp0le URL in my original post , but I was originally thinking the was kind of a SharePoint permissions issue. – Ben Rosales Jan 26 '15 at 14:05