I am trying to upload a document to a record using .Net SDK and calling it from a webapi. I manage to create the record and retrieve the record (that means my access set up in the webapi is working fine). But when I try to access the file path using InputDocument.SetAsFile(filepath) I get Access denied error. For testing purpose, i have given that file path everyone full access. The following is the code piece. I have the error at objDoc.SetAsFile(inputFileUNC).
Record objRec = new Record(objDB, recNumber);
InputDocument objDoc = new InputDocument();
objRec.SetDocument(objDoc, false, false, "Created via SDK");
So this is a Windows error right? Access denied to the folder?
What identity is the IIS App Pool running as, are you sure you have access to the path at the time you call SetAsFile()?
Yes IIS pool is running as the account which has admin rights on that folder. And just to be sure I have set that folder to have everyone full control . I think RM SDK could not access that folder.